]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/lib/spec/expectations/extensions/string_and_symbol.rb
added RSpec and RSpec on Rails
[rails.git] / vendor / gems / rspec-1.1.2 / lib / spec / expectations / extensions / string_and_symbol.rb
1 module Spec
2   module Expectations
3     module StringHelpers
4       def starts_with?(prefix)
5         to_s[0..(prefix.to_s.length - 1)] == prefix.to_s
6       end
7     end
8   end
9 end
10
11 class String
12   include Spec::Expectations::StringHelpers
13 end
14
15 class Symbol
16   include Spec::Expectations::StringHelpers
17 end