Skip to content

Commit

Permalink
Enable it_behaves_like/shared states
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Aug 9, 2013
1 parent 62d6dba commit 9062122
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
7 changes: 7 additions & 0 deletions spec/rubyspec/core/array/shared/collect.rb
@@ -0,0 +1,7 @@
describe :array_collect, :shared => true do

end

describe :array_collect_b, :shared => true do

end
2 changes: 1 addition & 1 deletion spec/rubyspec/core/array/shared/index.rb
Expand Up @@ -32,6 +32,6 @@ def x.==(obj) 3 == obj; end
it "produces an Enumerator" do
[].send(@method).should be_kind_of(enumerator_class)
end
end
end if false
end
end
3 changes: 3 additions & 0 deletions spec/rubyspec/core/array/shared/keep_if.rb
@@ -0,0 +1,3 @@
describe :keep_if, :shared => true do

end
3 changes: 3 additions & 0 deletions spec/rubyspec/core/array/shared/length.rb
@@ -0,0 +1,3 @@
describe :array_length, :shared => true do

end
3 changes: 3 additions & 0 deletions spec/rubyspec/core/array/shared/replace.rb
@@ -0,0 +1,3 @@
describe :array_replace, :shared => true do

end
3 changes: 3 additions & 0 deletions spec/rubyspec/core/array/shared/slice.rb
@@ -0,0 +1,3 @@
describe :array_slice, :shared => true do

end
13 changes: 3 additions & 10 deletions spec/spec_helper.rb
Expand Up @@ -156,11 +156,6 @@ def initialize(state, location, exception)
end

module Kernel
def opal_eval(str)
code = Opal::Parser.new.parse str
`eval(#{code})`
end

def opal_parse(str, file='(string)')
Opal::Grammar.new.parse str, file
end
Expand All @@ -170,13 +165,11 @@ def opal_eval_compiled(javascript)
end

def eval(str)
opal_eval str
code = Opal::Parser.new.parse str
`eval(#{code})`
end
end

module Kernel
# FIXME: remove
def it_behaves_like(*); end
alias_method :opal_eval, :eval
end

module MSpec
Expand Down

0 comments on commit 9062122

Please sign in to comment.