Permalink
Browse files

Implemented cleaner transform_to matcher so we can describe the class…

… directly.
  • Loading branch information...
1 parent 45dfb38 commit a60ba44d2d7d3e156ab30846ba612f3ef091a1ae @rubiety committed Oct 11, 2011
@@ -3,7 +3,8 @@
actual_as_sexp = actual.is_a?(String) ? RubyParser.new.parse(actual) : actual
expected_as_sexp = expected.is_a?(String) ? RubyParser.new.parse(expected) : expected
- @transformed = described_class.transform(actual_as_sexp)
+ transformer = described_class.is_a?(Class) ? described_class.new : described_class
+ @transformed = transformer.transform(actual_as_sexp)
@transformed == expected_as_sexp
end
@@ -1,5 +1,5 @@
require "spec_helper"
-describe RSpecify::Transformer.new do
+describe RSpecify::Transformer do
end
@@ -1,6 +1,6 @@
require "spec_helper"
-describe RSpecify::Transformers::TestClassAndMethods.new do
+describe RSpecify::Transformers::TestClassAndMethods do
describe "class extending ActiveSupport::TestCase" do
subject { %{
@@ -1,6 +1,6 @@
require "spec_helper"
-describe RSpecify::Transformers::TestUnitAssertions.new do
+describe RSpecify::Transformers::TestUnitAssertions do
describe "short assert equals" do
subject { %{assert_equals @one, "One"} }

0 comments on commit a60ba44

Please sign in to comment.