Skip to content

Implement get_feature_variable and create unit tests #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change type specific typos to non typed
  • Loading branch information
brandonhudavid committed Jul 26, 2019
commit 40d3b9013ba08bf02f7b782e6f98175d79f31483
6 changes: 3 additions & 3 deletions spec/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ class InvalidErrorHandler; end
}
allow(project_instance.decision_service).to receive(:get_variation_for_feature).and_return(decision_to_return)

expect(project_instance.get_feature_variable_boolean('boolean_single_variable_feature', 'boolean_variable', user_id, user_attributes))
expect(project_instance.get_feature_variable('boolean_single_variable_feature', 'boolean_variable', user_id, user_attributes))
.to eq(true)

expect(spy_logger).to have_received(:log).once
Expand All @@ -2207,7 +2207,7 @@ class InvalidErrorHandler; end

allow(project_instance.decision_service).to receive(:get_variation_for_feature).and_return(decision_to_return)

expect(project_instance.get_feature_variable_double('double_single_variable_feature', 'double_variable', user_id, user_attributes))
expect(project_instance.get_feature_variable('double_single_variable_feature', 'double_variable', user_id, user_attributes))
.to eq(42.42)

expect(spy_logger).to have_received(:log).once
Expand All @@ -2229,7 +2229,7 @@ class InvalidErrorHandler; end

allow(project_instance.decision_service).to receive(:get_variation_for_feature).and_return(decision_to_return)

expect(project_instance.get_feature_variable_integer('integer_single_variable_feature', 'integer_variable', user_id, user_attributes))
expect(project_instance.get_feature_variable('integer_single_variable_feature', 'integer_variable', user_id, user_attributes))
.to eq(42)

expect(spy_logger).to have_received(:log).once
Expand Down