Skip to content
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

Fixed specs to match changes in the latest RSpec #49

Merged
merged 1 commit into from
Jan 29, 2015
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
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ task "default" => "spec"

RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/**/*_spec.rb'
t.rspec_opts = ["--colour", "--format", "nested"]
t.rspec_opts = ["--colour", "--format", "documentation"]
end
6 changes: 3 additions & 3 deletions spec/clamp/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def default_port
end

it "sets the flag" do
command.nuts?.should be_true
command.nuts?.should be true
end

end
Expand All @@ -433,7 +433,7 @@ def default_port
end

it "clears the flag" do
command.nuts?.should be_false
command.nuts?.should be false
end

end
Expand Down Expand Up @@ -510,7 +510,7 @@ def default_port
lambda do
command.parse(%w(--help))
end.should_not raise_error
command.help.should be_true
command.help?.should be true
end

it "does not recognise -h" do
Expand Down
12 changes: 6 additions & 6 deletions spec/clamp/option/definition_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@
end

it "handles both positive and negative forms" do
option.handles?("--force").should be_true
option.handles?("--no-force").should be_true
option.handles?("--force").should be true
option.handles?("--no-force").should be true
end

describe "#flag_value" do

it "returns true for the positive variant" do
option.flag_value("--force").should be_true
option.flag_value("--no-force").should be_false
option.flag_value("--force").should be true
option.flag_value("--no-force").should be false
end

end
Expand All @@ -132,8 +132,8 @@
end

it "handles both switches" do
option.handles?("--key-file").should be_true
option.handles?("-k").should be_true
option.handles?("--key-file").should be true
option.handles?("-k").should be true
end

describe "#help" do
Expand Down