Permalink
Browse files

Removed irrelevat, non-dry spex

  • Loading branch information...
1 parent 3b77581 commit 9ef6e5b8a88abe45c8e2f6c6ab6a8d0f5c804fc3 @gilesbowkett committed Oct 2, 2008
Showing with 0 additions and 38 deletions.
  1. +0 −38 spec/erb_spec.rb
View
@@ -5,26 +5,6 @@
@towelie = Towelie.new(:console)
end
before(:all) do
- @the_nodes = [
- # second_file.rb
- [:defn, :foo,
- [:scope,
- [:block, [:args], [:str, "still unique"]]]],
- [:defn, :bar,
- [:scope,
- [:block, [:args], [:str, "something non-unique"]]]],
- [:defn, :baz,
- [:scope,
- [:block, [:args], [:str, "also unique"]]]],
-
- # first_file.rb
- [:defn, :foo,
- [:scope,
- [:block, [:args], [:str, "something unique"]]]],
- [:defn, :bar,
- [:scope,
- [:block, [:args], [:str, "something non-unique"]]]]
- ]
@duplicated_block =<<DUPLICATE_BLOCK
def bar
"something non-unique"
@@ -90,24 +70,6 @@ def foo
TWO_NODE_DIFF_BLOCK
end
- it "identifies duplication" do
- @towelie.parse("spec/test_data")
- @towelie.duplication?.should be_true
-
- @towelie.parse("spec/classes_modules")
- @towelie.duplication?.should be_true
- end
- it "returns no false positives when identifying duplication" do
- @towelie.parse("spec/non_duplicating_data")
- @towelie.duplication?.should be_false
- end
- it "extracts :defn nodes" do
- @towelie.parse("spec/test_data")
- @towelie.method_definitions.should == @the_nodes
-
- @towelie.parse("spec/classes_modules")
- @towelie.method_definitions.should == @the_nodes
- end
it "isolates duplicated blocks" do
@towelie.parse("spec/test_data")
@towelie.duplicated.should == @duplicated_block

0 comments on commit 9ef6e5b

Please sign in to comment.