Skip to content

Commit

Permalink
Change be_true and be_false to be(true) and be(false) in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed May 24, 2010
1 parent 0964d1a commit 2a5cea4
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
14 changes: 7 additions & 7 deletions spec/integration/auto_migration_spec.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions spec/integration/sql_spec.rb
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions spec/isolated/require_spec.rb
@@ -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
4 changes: 2 additions & 2 deletions spec/unit/migration_spec.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/sql/postgres_spec.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/sql/sqlite_extensions_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 2a5cea4

Please sign in to comment.