Commit a424b82d by Jon Yurek

Converted some be_trues and be_falses

parent 9294b4be
...@@ -85,7 +85,7 @@ Then /^I should have attachment columns for "([^"]*)"$/ do |attachment_name| ...@@ -85,7 +85,7 @@ Then /^I should have attachment columns for "([^"]*)"$/ do |attachment_name|
["#{attachment_name}_updated_at", :datetime] ["#{attachment_name}_updated_at", :datetime]
] ]
expect_columns.all?{ |column| columns.include? column }.should be_true expect_columns.all?{ |column| columns.include? column }.should eq true
end end
end end
...@@ -99,6 +99,6 @@ Then /^I should not have attachment columns for "([^"]*)"$/ do |attachment_name| ...@@ -99,6 +99,6 @@ Then /^I should not have attachment columns for "([^"]*)"$/ do |attachment_name|
["#{attachment_name}_updated_at", :datetime] ["#{attachment_name}_updated_at", :datetime]
] ]
expect_columns.none?{ |column| columns.include? column }.should be_true expect_columns.none?{ |column| columns.include? column }.should eq true
end end
end end
...@@ -164,7 +164,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, pa ...@@ -164,7 +164,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, pa
with_scope(parent) do with_scope(parent) do
field_checked = find_field(label)['checked'] field_checked = find_field(label)['checked']
if field_checked.respond_to? :should if field_checked.respond_to? :should
field_checked.should be_true field_checked.should eq true
else else
assert field_checked assert field_checked
end end
...@@ -175,7 +175,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label ...@@ -175,7 +175,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label
with_scope(parent) do with_scope(parent) do
field_checked = find_field(label)['checked'] field_checked = find_field(label)['checked']
if field_checked.respond_to? :should if field_checked.respond_to? :should
field_checked.should be_false field_checked.should eq false
else else
assert !field_checked assert !field_checked
end end
......
...@@ -78,10 +78,10 @@ describe Paperclip::Attachment do ...@@ -78,10 +78,10 @@ describe Paperclip::Attachment do
attachment = Paperclip::Attachment.new(:name, :instance, url_generator: mock_url_generator_builder) attachment = Paperclip::Attachment.new(:name, :instance, url_generator: mock_url_generator_builder)
attachment.url(:style_name, true) attachment.url(:style_name, true)
expect(mock_url_generator_builder.has_generated_url_with_options?(timestamp: true, escape: true)).to be_true expect(mock_url_generator_builder.has_generated_url_with_options?(timestamp: true, escape: true)).to eq true
attachment.url(:style_name, false) attachment.url(:style_name, false)
expect(mock_url_generator_builder.has_generated_url_with_options?(timestamp: false, escape: true)).to be_true expect(mock_url_generator_builder.has_generated_url_with_options?(timestamp: false, escape: true)).to eq true
end end
it "passes the style and options through to the URL generator on #url" do it "passes the style and options through to the URL generator on #url" do
...@@ -89,7 +89,7 @@ describe Paperclip::Attachment do ...@@ -89,7 +89,7 @@ describe Paperclip::Attachment do
attachment = Paperclip::Attachment.new(:name, :instance, url_generator: mock_url_generator_builder) attachment = Paperclip::Attachment.new(:name, :instance, url_generator: mock_url_generator_builder)
attachment.url(:style_name, options: :values) attachment.url(:style_name, options: :values)
expect(mock_url_generator_builder.has_generated_url_with_options?(options: :values)).to be_true expect(mock_url_generator_builder.has_generated_url_with_options?(options: :values)).to eq true
end end
it "passes default options through when #url is given one argument" do it "passes default options through when #url is given one argument" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment