Permalink
Browse files

Change be_true and be_false to be(true) and be(false) in specs

  • Loading branch information...
1 parent 0964d1a commit 2a5cea4335aa8397f18e078522bef2c747560f8f @dkubb dkubb committed May 24, 2010
@@ -188,7 +188,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -236,7 +236,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -268,7 +268,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -331,7 +331,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -370,7 +370,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -411,7 +411,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -478,7 +478,7 @@ class Article
end
it 'should return true' do
- @response.should be_true
+ @response.should be(true)
end
it "should create a #{statement} column" do
@@ -120,12 +120,12 @@ def insert_migration_record
end
it "should know if the migration_info table exists" do
- @migration.send(:migration_info_table_exists?).should be_true
+ @migration.send(:migration_info_table_exists?).should be(true)
end
it "should know if the migration_info table does not exist" do
DataMapper::Spec.adapter.execute("DROP TABLE migration_info") rescue nil
- @migration.send(:migration_info_table_exists?).should be_false
+ @migration.send(:migration_info_table_exists?).should be(false)
end
it "should be able to find the migration_info record for itself" do
@@ -134,15 +134,15 @@ def insert_migration_record
end
it "should know if a migration needs_up?" do
- @migration.send(:needs_up?).should be_true
+ @migration.send(:needs_up?).should be(true)
insert_migration_record
- @migration.send(:needs_up?).should be_false
+ @migration.send(:needs_up?).should be(false)
end
it "should know if a migration needs_down?" do
- @migration.send(:needs_down?).should be_false
+ @migration.send(:needs_down?).should be(false)
insert_migration_record
- @migration.send(:needs_down?).should be_true
+ @migration.send(:needs_down?).should be(true)
end
it "should properly quote the migration_info table via the adapter for use in queries" do
@@ -158,9 +158,9 @@ def insert_migration_record
it "should create the migration_info table if it doesn't exist" do
DataMapper::Spec.adapter.execute("DROP TABLE migration_info")
- @migration.send(:migration_info_table_exists?).should be_false
+ @migration.send(:migration_info_table_exists?).should be(false)
@migration.send(:create_migration_info_table_if_needed)
- @migration.send(:migration_info_table_exists?).should be_true
+ @migration.send(:migration_info_table_exists?).should be(true)
end
it "should insert a record into the migration_info table on up" do
@@ -1,25 +1,25 @@
shared_examples_for "require 'dm-migrations'" do
it "should include the migration api in the DataMapper namespace" do
- DataMapper.respond_to?(:migrate! ).should be_true
- DataMapper.respond_to?(:auto_migrate! ).should be_true
- DataMapper.respond_to?(:auto_upgrade! ).should be_true
- DataMapper.respond_to?(:auto_migrate_up!, true).should be_true
- DataMapper.respond_to?(:auto_migrate_down!, true).should be_true
+ DataMapper.respond_to?(:migrate! ).should be(true)
+ DataMapper.respond_to?(:auto_migrate! ).should be(true)
+ DataMapper.respond_to?(:auto_upgrade! ).should be(true)
+ DataMapper.respond_to?(:auto_migrate_up!, true).should be(true)
+ DataMapper.respond_to?(:auto_migrate_down!, true).should be(true)
end
%w[ Repository Model ].each do |name|
it "should include the migration api in DataMapper::#{name}" do
- (DataMapper.const_get(name) < DataMapper::Migrations.const_get(name)).should be_true
+ (DataMapper.const_get(name) < DataMapper::Migrations.const_get(name)).should be(true)
end
end
it "should include the migration api into the adapter" do
- @adapter.respond_to?(:storage_exists? ).should be_true
- @adapter.respond_to?(:field_exists? ).should be_true
- @adapter.respond_to?(:upgrade_model_storage).should be_true
- @adapter.respond_to?(:create_model_storage ).should be_true
- @adapter.respond_to?(:destroy_model_storage).should be_true
+ @adapter.respond_to?(:storage_exists? ).should be(true)
+ @adapter.respond_to?(:field_exists? ).should be(true)
+ @adapter.respond_to?(:upgrade_model_storage).should be(true)
+ @adapter.respond_to?(:create_model_storage ).should be(true)
+ @adapter.respond_to?(:destroy_model_storage).should be(true)
end
end
@@ -58,11 +58,11 @@
it 'should set @verbose from the options hash' do
m = DataMapper::Migration.new(1, :do_nothing, :verbose => false) {}
- m.instance_variable_get(:@verbose).should be_false
+ m.instance_variable_get(:@verbose).should be(false)
end
it 'should set @verbose to true by default' do
- @m.instance_variable_get(:@verbose).should be_true
+ @m.instance_variable_get(:@verbose).should be(true)
end
it 'should set the @up_action to an empty block' do
@@ -11,11 +11,11 @@ class PostgresExtension
end
it 'should support schema-level transactions' do
- @pe.supports_schema_transactions?.should be_true
+ @pe.supports_schema_transactions?.should be(true)
end
it 'should support the serial column attribute' do
- @pe.supports_serial?.should be_true
+ @pe.supports_serial?.should be(true)
end
it 'should create a table object from the name' do
@@ -11,11 +11,11 @@ class SqliteExtension
end
it 'should support schema-level transactions' do
- @se.supports_schema_transactions?.should be_true
+ @se.supports_schema_transactions?.should be(true)
end
it 'should support the serial column attribute' do
- @se.supports_serial?.should be_true
+ @se.supports_serial?.should be(true)
end
it 'should create a table object from the name' do

0 comments on commit 2a5cea4

Please sign in to comment.