Permalink
Browse files

fix specs

  • Loading branch information...
1 parent 85eac3e commit f8b1de21f477fa48fd9d0c19473a376141b6b573 @vito committed Dec 30, 2012
Showing with 5 additions and 8 deletions.
  1. +2 −2 spec/suite/patterns.rb
  2. +3 −6 spec/suite/patterns_helper.rb
@@ -659,7 +659,7 @@ module Atomy::Patterns
it("matches by singleton class") do
x = Object.new
- p = SingletonClass.new(Atomy::AST::Literal.new(0, x))
+ p = SingletonClass.new(Atomy::AST::Literal.new(:value => x))
p.in_context(Atomy::Module.new)
p.must_be :===, x
@@ -669,7 +669,7 @@ module Atomy::Patterns
it("targets the singleton class of its body for definition") do
x = Object.new
- p = SingletonClass.new(Atomy::AST::Literal.new(0, x))
+ p = SingletonClass.new(Atomy::AST::Literal.new(:value => x))
mod = Atomy::Module.new
p.in_context(mod)
p.definition_target.must_equal x.singleton_class
@@ -1,11 +1,8 @@
def match(pat, val)
Atomy::Compiler.eval(
Atomy::AST::Set.new(
- 0,
- Atomy::AST::Pattern.new(
- 0,
- pat),
- Atomy::AST::Literal.new(0, val)),
+ :left => Atomy::AST::Pattern.new(:pattern => pat),
+ :right => Atomy::AST::Literal.new(:value => val)),
Atomy::Module.new,
Binding.setup(
Rubinius::VariableScope.of_sender,
@@ -105,7 +102,7 @@ def self.arbitrary
class QuasiQuote
def self.arbitrary
- new(Atomy::AST::QuasiQuote.new(0, random_symbol.to_node))
+ new(Atomy::AST::QuasiQuote.new(:expression => random_symbol.to_node))
end
end

0 comments on commit f8b1de2

Please sign in to comment.