Use be_true instead of be true for cleaner output
This commit is contained in:
parent
8b4ecc2a2e
commit
cdcb2a78c5
|
@ -3,16 +3,16 @@ require 'spec_helper'
|
||||||
describe Impressionist do
|
describe Impressionist do
|
||||||
it "should be extended from ActiveRecord::Base" do
|
it "should be extended from ActiveRecord::Base" do
|
||||||
method = RUBY_VERSION.match("1.8") ? "is_impressionable" : :is_impressionable
|
method = RUBY_VERSION.match("1.8") ? "is_impressionable" : :is_impressionable
|
||||||
ActiveRecord::Base.methods.include?(method).should be true
|
ActiveRecord::Base.methods.include?(method).should be_true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should include methods in ApplicationController" do
|
it "should include methods in ApplicationController" do
|
||||||
method = RUBY_VERSION.match("1.8") ? "impressionist" : :impressionist
|
method = RUBY_VERSION.match("1.8") ? "impressionist" : :impressionist
|
||||||
ApplicationController.instance_methods.include?(method).should be true
|
ApplicationController.instance_methods.include?(method).should be_true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should include the before_filter method in ApplicationController" do
|
it "should include the before_filter method in ApplicationController" do
|
||||||
filters = ApplicationController._process_action_callbacks.select { |c| c.kind == :before }
|
filters = ApplicationController._process_action_callbacks.select { |c| c.kind == :before }
|
||||||
filters.collect{|filter|filter.filter}.include?(:impressionist_app_filter).should be true
|
filters.collect{|filter|filter.filter}.include?(:impressionist_app_filter).should be_true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,11 +11,11 @@ describe Impressionist do
|
||||||
File.delete("#{migrations_dir}/#{impressions_migration}") unless impressions_migration.blank?
|
File.delete("#{migrations_dir}/#{impressions_migration}") unless impressions_migration.blank?
|
||||||
generator_output = systemu("rails g impressionist")[1]
|
generator_output = systemu("rails g impressionist")[1]
|
||||||
migration_name = generator_output.split("migrate/")[1].strip
|
migration_name = generator_output.split("migrate/")[1].strip
|
||||||
Dir.entries(migrations_dir).include?(migration_name).should be true
|
Dir.entries(migrations_dir).include?(migration_name).should be_true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should run the migration created in the previous spec" do
|
it "should run the migration created in the previous spec" do
|
||||||
migrate_output = systemu("rake db:migrate RAILS_ENV=test")
|
migrate_output = systemu("rake db:migrate RAILS_ENV=test")
|
||||||
migrate_output[1].include?("CreateImpressionsTable: migrated").should be true
|
migrate_output[1].include?("CreateImpressionsTable: migrated").should be_true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue