Skip to content

Commit 2523546

Browse files
committed
constants file
1 parent b8ec220 commit 2523546

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

spec/constants.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Constants
2+
BIOMASS_TEST_PROJECT_ID = "pro_test_c3a9feba769fc7a8806377266ca9ff6a"
3+
end

spec/integration/orders_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
RSpec.describe 'Orders Integration' do
2-
# biomass test project
3-
BIOMASS_TEST_PROJECT_ID = "pro_test_c3a9feba769fc7a8806377266ca9ff6a"
4-
52
before do
63
Patch.configure do |config|
74
config.access_token = ENV['SANDBOX_API_KEY']
@@ -29,7 +26,9 @@
2926
end
3027

3128
it 'supports create with a project-id' do
32-
retrieve_project_response = Patch::Project.retrieve_project(BIOMASS_TEST_PROJECT_ID)
29+
retrieve_project_response = Patch::Project.retrieve_project(
30+
Constants::BIOMASS_TEST_PROJECT_ID
31+
)
3332

3433
project_id = retrieve_project_response.data.id
3534
average_price_per_tonne_cents_usd = retrieve_project_response.data.average_price_per_tonne_cents_usd

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# load the gem
1414
require 'patch_ruby'
15+
require 'constants'
1516

1617
# The following was generated by the `rspec --init` command. Conventionally, all
1718
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.

0 commit comments

Comments
 (0)