Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

https://github.com/KnapsackPro/knapsack_pro-ruby/pull/34

* Show better explanation what to do when there is missing test suite token environment variable.

https://github.com/KnapsackPro/knapsack_pro-ruby/pull/35

https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.36.0...v0.37.0

### 0.36.0
Expand Down
3 changes: 2 additions & 1 deletion lib/knapsack_pro/config/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def fixed_queue_split
end

def test_suite_token
required_env('KNAPSACK_PRO_TEST_SUITE_TOKEN')
env_name = 'KNAPSACK_PRO_TEST_SUITE_TOKEN'
ENV[env_name] || raise("Missing environment variable #{env_name}. You should set environment variable like #{env_name}_RSPEC (note there is suffix _RSPEC at the end). knapsack_pro gem will set #{env_name} based on #{env_name}_RSPEC value. If you use other test runner than RSpec then use proper suffix.")
end

def test_suite_token_rspec
Expand Down
2 changes: 1 addition & 1 deletion spec/knapsack_pro/config/env_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@

context "when ENV doesn't exist" do
it do
expect { subject }.to raise_error('Missing environment variable KNAPSACK_PRO_TEST_SUITE_TOKEN')
expect { subject }.to raise_error('Missing environment variable KNAPSACK_PRO_TEST_SUITE_TOKEN. You should set environment variable like KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC (note there is suffix _RSPEC at the end). knapsack_pro gem will set KNAPSACK_PRO_TEST_SUITE_TOKEN based on KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC value. If you use other test runner than RSpec then use proper suffix.')
end
end
end
Expand Down