Sha256: be27eb71ad8a1193da5d2b8940d676ab606184469d66359c02f3b3cbf78c428c
Contents?: true
Size: 745 Bytes
Versions: 20
Compression:
Stored size: 745 Bytes
Contents
# frozen_string_literal: true RSpec.describe Mutant::AST::Sexp do let(:object) do Class.new do include Mutant::AST::Sexp public :n_not public :s end.new end describe '#n_not' do subject { object.n_not(node) } let(:node) { s(:true) } it 'returns negated ast' do expect(subject).to eql(s(:send, s(:true), :!)) end end describe '#s' do subject { object.s(*arguments) } context 'with single argument' do let(:arguments) { %i[foo] } it { should eql(Parser::AST::Node.new(:foo)) } end context 'with single multiple arguments' do let(:arguments) { %i[foo bar baz] } it { should eql(Parser::AST::Node.new(:foo, %i[bar baz])) } end end end
Version data entries
20 entries across 20 versions & 1 rubygems