Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix specs

  • Loading branch information...
commit f8b1de21f477fa48fd9d0c19473a376141b6b573 1 parent 85eac3e
Alex Suraci authored

Showing 2 changed files with 5 additions and 8 deletions. Show diff stats Hide diff stats

  1. +2 2 spec/suite/patterns.rb
  2. +3 6 spec/suite/patterns_helper.rb
4 spec/suite/patterns.rb
@@ -659,7 +659,7 @@ module Atomy::Patterns
659 659
660 660 it("matches by singleton class") do
661 661 x = Object.new
662   - p = SingletonClass.new(Atomy::AST::Literal.new(0, x))
  662 + p = SingletonClass.new(Atomy::AST::Literal.new(:value => x))
663 663 p.in_context(Atomy::Module.new)
664 664
665 665 p.must_be :===, x
@@ -669,7 +669,7 @@ module Atomy::Patterns
669 669
670 670 it("targets the singleton class of its body for definition") do
671 671 x = Object.new
672   - p = SingletonClass.new(Atomy::AST::Literal.new(0, x))
  672 + p = SingletonClass.new(Atomy::AST::Literal.new(:value => x))
673 673 mod = Atomy::Module.new
674 674 p.in_context(mod)
675 675 p.definition_target.must_equal x.singleton_class
9 spec/suite/patterns_helper.rb
... ... @@ -1,11 +1,8 @@
1 1 def match(pat, val)
2 2 Atomy::Compiler.eval(
3 3 Atomy::AST::Set.new(
4   - 0,
5   - Atomy::AST::Pattern.new(
6   - 0,
7   - pat),
8   - Atomy::AST::Literal.new(0, val)),
  4 + :left => Atomy::AST::Pattern.new(:pattern => pat),
  5 + :right => Atomy::AST::Literal.new(:value => val)),
9 6 Atomy::Module.new,
10 7 Binding.setup(
11 8 Rubinius::VariableScope.of_sender,
@@ -105,7 +102,7 @@ def self.arbitrary
105 102
106 103 class QuasiQuote
107 104 def self.arbitrary
108   - new(Atomy::AST::QuasiQuote.new(0, random_symbol.to_node))
  105 + new(Atomy::AST::QuasiQuote.new(:expression => random_symbol.to_node))
109 106 end
110 107 end
111 108

0 comments on commit f8b1de2

Please sign in to comment.
Something went wrong with that request. Please try again.