spec/r-fxxk_spec.rb in r-fxxk-0.3.0 vs spec/r-fxxk_spec.rb in r-fxxk-0.4.0

- old
+ new

@@ -1,8 +1,8 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper') -class Ook < BrainFuck +class Ook < Brainfuck nxt 'Ook. Ook?' prv 'Ook? Ook.' inc 'Ook. Ook.' dec 'Ook! Ook!' put 'Ook! Ook.' @@ -13,13 +13,13 @@ def src(file) open(File.expand_path(File.dirname(__FILE__) + "/test_data/#{file}")).read end -describe BrainFuck do - context 'default BrainFuck' do - subject { BrainFuck.new } +describe Brainfuck do + context 'default Brainfuck' do + subject { Brainfuck.new } its(:nxt) { should eq '>' } its(:prv) { should eq '<' } its(:inc) { should eq '+' } its(:dec) { should eq '-' } its(:put) { should eq '.' } @@ -30,11 +30,11 @@ subject.fuck(src('hello.bf')).should eq "Hello World!\n" end end context 'customize in initialize' do - subject { BrainFuck.new(nxt: 'M', prv: 'O', inc: 'N', dec: 'A', get: 'm', put: 'o', opn: 'n', cls: 'a') } + subject { Brainfuck.new(nxt: 'M', prv: 'O', inc: 'N', dec: 'A', get: 'm', put: 'o', opn: 'n', cls: 'a') } its(:nxt) { should eq 'M' } its(:prv) { should eq 'O' } its(:inc) { should eq 'N' } its(:dec) { should eq 'A' } its(:get) { should eq 'm' } @@ -42,11 +42,11 @@ its(:opn) { should eq 'n' } its(:cls) { should eq 'a' } it "fuck(hello.mona) should be 'Hello World\\n'" do subject.fuck(src('hello.mona')).should eq "Hello World!\n" end - it "translate(BrainFuck.new, hello.bf) should == hello.mona" do - subject.translate(BrainFuck, src('hello.bf')).strip.should eq src('hello.mona').strip + it "translate(Brainfuck.new, hello.bf) should == hello.mona" do + subject.translate(Brainfuck, src('hello.bf')).strip.should eq src('hello.mona').strip end its(:hello_world) { should == src('hello.mona').strip } end context 'customized class' do