spec/spec_helper.rb in dm-rspec-0.2.4 vs spec/spec_helper.rb in dm-rspec-0.3.0
- old
+ new
@@ -5,10 +5,11 @@
require 'dm-validations'
require 'dm-migrations'
require 'dm-sqlite-adapter'
require 'dm-rspec'
+require 'pry'
DataMapper.setup(:default, "sqlite3::memory:")
# Requires supporting files with custom matchers and macros, etc,
@@ -32,13 +33,15 @@
end
class Proc
include ::RSpec::Matchers
def should_pass
- lambda { self.call }.should_not raise_error
+ expect{ self.call }.to_not raise_error
+ #lambda { self.call }.should_not raise_error
end
def should_fail
- lambda { self.call }.should raise_error
+ expect{self.call}.to raise_error
+ #lambda { self.call }.should raise_error
end
end