specky/syntax/rspec.vim
branchvim-stuff
changeset 19 763cef799c74
parent 17 54598f9f279c
equal deleted inserted replaced
18:bf8f3c788cad 19:763cef799c74
     1 "
     1 "
     2 " specky: syntax highlighting for rspec files.
     2 " specky: syntax highlighting for rspec files.
       
     3 " This includes keywords for both rspec 1.x and rspec 2.x.
     3 " $Id$
     4 " $Id$
     4 "
     5 "
     5 
     6 
     6 runtime! syntax/ruby.vim
     7 runtime! syntax/ruby.vim
     7 unlet b:current_syntax
     8 unlet b:current_syntax
     8 
     9 
     9 syntax keyword rspecGroupMethods describe it its let it_should_behave_like pending
    10 syntax keyword rspecGroupMethods context describe example it its let it_should_behave_like shared_examples_for subject it_behaves_like pending specify
    10 highlight link rspecGroupMethods Type
    11 highlight link rspecGroupMethods Type
    11 
    12 
    12 syntax keyword rspecBeforeAndAfter after after_suite_parts append_after append_before before before_suite_parts prepend_after prepend_before
    13 syntax keyword rspecBeforeAndAfter after after_suite_parts append_after append_before before before_suite_parts prepend_after prepend_before around
    13 highlight link rspecBeforeAndAfter Statement
    14 highlight link rspecBeforeAndAfter Statement
    14 
    15 
    15 syntax keyword rspecMocks mock stub double
    16 syntax keyword rspecMocks double mock stub stub_chain
    16 highlight link rspecMocks Constant
    17 highlight link rspecMocks Constant
    17 
    18 
    18 syntax keyword rspecMockMethods and_raise and_return and_throw and_yield build_child called_max_times expected_args invoke matches
    19 syntax keyword rspecMockMethods and_raise and_return and_throw and_yield build_child called_max_times expected_args invoke matches
    19 highlight link rspecMockMethods Function
    20 highlight link rspecMockMethods Function
    20 
    21 
    21 syntax keyword rspecKeywords should should_not should_not_receive should_receive
    22 syntax keyword rspecKeywords should should_not should_not_receive should_receive
    22 highlight link rspecKeywords Constant
    23 highlight link rspecKeywords Constant
    23 
    24 
    24 syntax keyword rspecMatchers be_a be_a_kind_of be_an be_an_instance_of be_close be_false be_instance_of be_kind_of be_nil be_true change eql equal exist expect have have_at_least have_at_most have_exactly include match matcher raise_error raise_exception respond_to satisfy throw_symbol to to_not wrap_expectation
    25 syntax keyword rspecMatchers be change eql equal exist expect have have_at_least have_at_most have_exactly include match matcher raise_error raise_exception respond_to satisfy throw_symbol to to_not when wrap_expectation
       
    26 syntax match rspecMatchers /\<\(be\|have\)_\w\+\>/
    25 highlight link rspecMatchers Function
    27 highlight link rspecMatchers Function
    26 
    28 
    27 syntax keyword rspecMessageExpectation advise any_number_of_times at_least at_most exactly expected_messages_received generate_error ignoring_args matches_at_least_count matches_at_most_count matches_exact_count matches_name_but_not_args negative_expectation_for never once ordered similar_messages times twice verify_messages_received with
    29 syntax keyword rspecMessageExpectation advise any_args any_number_of_times anything at_least at_most exactly expected_messages_received generate_error hash_including hash_not_including ignoring_args instance_of matches_at_least_count matches_at_most_count matches_exact_count matches_name_but_not_args negative_expectation_for never no_args once ordered similar_messages times twice verify_messages_received with 
    28 highlight link rspecMessageExpectation Function
    30 highlight link rspecMessageExpectation Function
    29 
    31 
    30 let b:current_syntax = "rspec"
    32 let b:current_syntax = "rspec"
    31 
    33