Permalink
Browse files

implement more specs

  • Loading branch information...
1 parent 5ef64c4 commit 83c2a3b3b5b65ec77d60b1896d7c0589fd4c4aa8 @bakineggs committed May 1, 2012
Showing with 35 additions and 5 deletions.
  1. +35 −5 spec/language_spec.rb
View
@@ -2511,8 +2511,15 @@ def parse_state definition
end
describe 'referenced in a creating condition' do
- it 'applies the rule'
- it 'allows the variable to be used in a code segment'
+ let(:rules) { <<-EOS }
+ +Creating: X
+ !Matched:
+ +Matched:
+ EOS
+
+ let(:start_state) { "" }
+ it_applies_the_rule "Creating:\nMatched:"
+ it_allows_the_variable_to_be_used_in_a_code_segment "X", "Creating"
describe 'and another creating condition' do
it 'applies the rule'
@@ -2521,15 +2528,38 @@ def parse_state definition
end
describe 'and a preventing condition' do
- it 'causes a compile error'
+ let(:rules) { <<-EOS }
+ +Creating: X
+ !Preventing: X
+ !Matched:
+ +Matched:
+ EOS
+
+ let(:start_state) { "" }
+ it_causes_a_compile_error
end
end
describe 'referenced in a preventing condition' do
- it 'causes a compile error'
+ let(:rules) { <<-EOS }
+ !Preventing: X
+ !Matched:
+ +Matched:
+ EOS
+
+ let(:start_state) { "" }
+ it_causes_a_compile_error
describe 'and another preventing condition' do
- it 'causes a compile error'
+ let(:rules) { <<-EOS }
+ !Preventing 1: X
+ !Preventing 2: X
+ !Matched:
+ +Matched:
+ EOS
+
+ let(:start_state) { "" }
+ it_causes_a_compile_error
end
end

0 comments on commit 83c2a3b

Please sign in to comment.