From 18fd6c17c29686e08b564fb1149ee3a9fecf6584 Mon Sep 17 00:00:00 2001 From: Stephen McGinty Date: Mon, 30 May 2016 18:56:07 +0100 Subject: [PATCH] Minor code cleanup/updated to latest 3rd party APIs --- .rbenv-version | 1 - rakefile => Rakefile | 1 - spec/cranky_spec.rb | 2 +- spec/spec_helper.rb | 7 ++++--- 4 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .rbenv-version rename rakefile => Rakefile (97%) diff --git a/.rbenv-version b/.rbenv-version deleted file mode 100644 index 0a95b9f..0000000 --- a/.rbenv-version +++ /dev/null @@ -1 +0,0 @@ -1.9.2-p290 diff --git a/rakefile b/Rakefile similarity index 97% rename from rakefile rename to Rakefile index bed03a8..cdaa1d2 100644 --- a/rakefile +++ b/Rakefile @@ -8,7 +8,6 @@ require 'rspec/core/rake_task' desc "Run specs" RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = ("spec/**/*_spec.rb") - t.rcov = true end task :default => :spec diff --git a/spec/cranky_spec.rb b/spec/cranky_spec.rb index be4bbcf..bfb20d5 100644 --- a/spec/cranky_spec.rb +++ b/spec/cranky_spec.rb @@ -133,7 +133,7 @@ end it "raises exception if trait method is undefined" do - expect { Factory.build(:user_by_define, :traits => :manager) }.to raise_error("Invalid trait 'manager'! No method 'apply_trait_manager_to_user_by_define' is defined.") + lambda { Factory.build(:user_by_define, :traits => :manager) }.should raise_error("Invalid trait 'manager'! No method 'apply_trait_manager_to_user_by_define' is defined.") end specify "attributes are not assigned when they have the value :skip" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1f779f7..2a0596e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,6 +3,10 @@ require 'cranky' +RSpec.configure do |config| + config.expect_with(:rspec) { |c| c.syntax = :should } +end + class TestClass attr_accessor :valid @@ -96,6 +100,3 @@ def apply_trait_manager_to_user_manually(user) user.role = :manager end end - - -