spec/spec_helper.rb in opal-activesupport-0.1.0 vs spec/spec_helper.rb in opal-activesupport-0.2.0
- old
+ new
@@ -1,11 +1,23 @@
require 'opal-rspec'
require 'opal-activesupport'
require 'active_support/inflector'
module TestUnitHelpers
+ def assert actual
+ expect(actual).to be_truthy
+ end
+
+ def assert_nil actual
+ expect(actual).to be_nil
+ end
+
def assert_equal actual, expected
- actual.should == expected
+ expect(expected).to eq(actual)
+ end
+
+ def assert_raise error, &block
+ expect(&block).to raise_error(error)
end
end
RSpec.configure do |config|
config.include TestUnitHelpers