spec/grape/middleware/prefixer_spec.rb in grape-0.0.0.alpha.2 vs spec/grape/middleware/prefixer_spec.rb in grape-0.1.0
- old
+ new
@@ -20,6 +20,11 @@
end
it 'should pass through unaltered if there is no prefix' do
subject.call('PATH_INFO' => '/awesome').last.should == '/awesome'
end
+
+ it 'should only remove the first instance of the prefix' do
+ @options = {:prefix => 'api'}
+ subject.call('PATH_INFO' => '/api/v1/api/awesome').last.should == '/v1/api/awesome'
+ end
end
\ No newline at end of file