spec/unit/string_spec.rb in couch_potato-0.2.27 vs spec/unit/string_spec.rb in couch_potato-0.2.28
- old
+ new
@@ -1,13 +1,17 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe String, 'camelize' do
it "should camelize a string" do
'my_string'.camelize.should == 'MyString'
end
end
-describe String, 'underscore' do
- it "should underscore a string" do
- 'MyString'.underscore.should == 'my_string'
+describe String, 'snake_case' do
+ it "should snake_case a string" do
+ 'MyString'.snake_case.should == 'my_string'
+ end
+
+ it "should snake_case a string using a custom separator" do
+ 'My::String'.snake_case('::').should == 'my::string'
end
end
\ No newline at end of file