Permalink
Browse files

more changes

  • Loading branch information...
1 parent e85319b commit a2c02a37fb2a7e1c5ad7cac690973f29d23ff3f8 @dchelimsky committed Oct 10, 2009
Showing with 2 additions and 27 deletions.
  1. BIN RSpecTipsAndTricks.key
  2. +2 −27 code/railsapp/spec/helpers/accounts_helper_spec.rb
View
Binary file not shown.
@@ -1,34 +1,9 @@
require 'spec_helper'
-module WrappedAssertions
- attr_reader :assertion_error
-
- def self.extension_modules
- @extension_modules ||= [Test::Unit::Assertions]
- end
-
- def self.add_assertions(mod)
- extension_modules << mod
- end
-
- def wrap_assertion
- WrappedAssertions.extension_modules.map {|mod| extend mod}
- begin
- yield
- true
- rescue Exception => e
- @assertion_error = e
- false
- end
- end
-end
-
-WrappedAssertions.add_assertions ActionController::TestCase::Assertions
-
Spec::Matchers.define :match_dom do |expected|
- extend WrappedAssertions
+ extend ActionController::TestCase::Assertions
match do |actual|
- wrap_assertion do
+ wrapped_assertion do
assert_dom_equal expected, actual
end
end

0 comments on commit a2c02a3

Please sign in to comment.