Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
Add spec to assert that nested sortah blocks are ignored
Browse files Browse the repository at this point in the history
Works out of the box w/ no changes... hurray for singletons?
  • Loading branch information
jfredett committed Nov 1, 2011
1 parent 08bfe89 commit 2954763
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions spec/parser_spec.rb
Expand Up @@ -15,6 +15,7 @@
sortah.should_not be_nil
end


it "should parse defined 'simple' destinations" do
expect {
sortah do
Expand Down Expand Up @@ -230,15 +231,30 @@
sortah.maildir.should == "/home/user/.mail/personal"
end

it "should pass over a nested #sortah block" do
expect {
sortah do
sortah do
destination :foo, "foo/"

sortah do
end
end
end
}.should_not raise_error
sortah.destinations[:foo].should == 'foo/'
end
end

#acceptance criteria
it "should parse an example sortah file, which contains all of the language elements" do
expect {
sortah do
destination :place, "somewhere"
destination :devnull, :abs => "/dev/null"
destination :bitbucket, :devnull
sortah do
destination :place, "somewhere"
destination :devnull, :abs => "/dev/null"
destination :bitbucket, :devnull
end

lens :random_value do
rand
Expand Down

0 comments on commit 2954763

Please sign in to comment.