Skip to content

Commit 7ce90a0

Browse files
committed
Add bitbucket_rest_api_spec
1 parent b98a6a6 commit 7ce90a0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

spec/bitbucket_rest_api_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
describe BitBucket do
2+
let(:api) { BitBucket }
3+
4+
describe "register_constant" do
5+
it "sets a constant" do
6+
api.register_constant({const_1: 'value1'})
7+
end
8+
end
9+
10+
describe "lookup_constant" do
11+
it "returns the constant's value" do
12+
expect(api.lookup_constant('CONST_1')).to eq 'value1'
13+
expect{ api.lookup_constant('UNKNOWN_CONSTANT')}.to raise_error NameError
14+
end
15+
end
16+
17+
end

0 commit comments

Comments
 (0)