Permalink
Browse files

working to update test to rspec 3.0

  • Loading branch information...
1 parent 3680277 commit 8e56e6487a89cab703c7b2d85b29ccf3293e4bbe @wbailey committed Jun 11, 2014
Showing with 26 additions and 22 deletions.
  1. +14 −10 Gemfile.lock
  2. +12 −12 spec/options_spec.rb
View
@@ -7,12 +7,12 @@ GEM
autotest-fsevent (0.2.9)
sys-uname
autotest-growl (0.2.16)
- aws-sdk (1.40.3)
+ aws-sdk (1.42.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
colored (1.2)
columnize (0.8.9)
- command_line_reporter (3.3.1)
+ command_line_reporter (3.3.2)
colored (>= 1.2)
debugger-linecache (1.2.0)
debugger2 (1.0.0.beta2)
@@ -25,14 +25,18 @@ GEM
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
rake (10.3.2)
- rspec (2.14.1)
- rspec-core (~> 2.14.0)
- rspec-expectations (~> 2.14.0)
- rspec-mocks (~> 2.14.0)
- rspec-core (2.14.8)
- rspec-expectations (2.14.5)
- diff-lcs (>= 1.1.3, < 2.0)
- rspec-mocks (2.14.6)
+ rspec (3.0.0)
+ rspec-core (~> 3.0.0)
+ rspec-expectations (~> 3.0.0)
+ rspec-mocks (~> 3.0.0)
+ rspec-core (3.0.0)
+ rspec-support (~> 3.0.0)
+ rspec-expectations (3.0.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.0.0)
+ rspec-mocks (3.0.1)
+ rspec-support (~> 3.0.0)
+ rspec-support (3.0.0)
sys-uname (0.9.2)
ffi (>= 1.0.0)
View
@@ -11,58 +11,58 @@ def cli(args)
it 'defines default options' do
cli %w{production app} do
options = Claws::Options.parse
- options.connect.should be_true
- options.source.should == 'ec2'
- options.selection.should be_nil
+ expect(options.connect).to be(true)
+ expect(options.source).to eq('ec2')
+ expect(options.selection).to be(nil)
end
end
it 'accepts display only flag' do
# By default we want to connect to the instance
- Claws::Options.parse.connect.should be_true
+ expect(Claws::Options.parse.connect).to be(true)
# Allow the user to override and just display information
cli %w{-d} do
- Claws::Options.parse.connect.should be_false
+ expect(Claws::Options.parse.connect).to be(false)
end
cli %w{--display-only} do
- Claws::Options.parse.connect.should be_false
+ expect(Claws::Options.parse.connect).to be(false)
end
end
it 'accepts a choice flag' do
cli %w{-c 10} do
- Claws::Options.parse.selection.should == 10
+ expect(Claws::Options.parse.selection).to eq(10)
end
cli %w{--choice 10} do
- Claws::Options.parse.selection.should == 10
+ expect(Claws::Options.parse.selection).to eq(10)
end
end
it 'accepts a source flag' do
cli %w{-s elb} do
options = Claws::Options.parse
- options.source.should == 'elb'
+ expect(options.source).to eq('elb')
end
cli %w{--source elb} do
options = Claws::Options.parse
- options.source.should == 'elb'
+ expect(options.source).to eq('elb')
end
end
context 'capistrano' do
it 'defines the environment' do
cli %w{production app} do
- Claws::Options.parse.environment.should == 'production'
+ expect(Claws::Options.parse.environment).to eq('production')
end
end
it 'defines the role' do
cli %w{production app} do
- Claws::Options.parse.role.should == 'app'
+ expect(Claws::Options.parse.role).to eq('app')
end
end
end

0 comments on commit 8e56e64

Please sign in to comment.