Sha256: c40ebaa2f80284e09e9e3188c2289c6a85d208e121e5b29e556fe8503dfc5e72
Contents?: true
Size: 750 Bytes
Versions: 5
Compression:
Stored size: 750 Bytes
Contents
require 'spec_helper' describe PostDecorator do subject { PostDecorator.new(source) } let(:source) { Post.create } it "can use path helpers with its model" do subject.path_with_model.should == "/en/posts/#{source.id}" end it "can use path helpers with its id" do subject.path_with_id.should == "/en/posts/#{source.id}" end it "can use url helpers with its model" do subject.url_with_model.should == "http://www.example.com/en/posts/#{source.id}" end it "can use url helpers with its id" do subject.url_with_id.should == "http://www.example.com/en/posts/#{source.id}" end it "can be passed implicitly to url_for" do subject.link.should == "<a href=\"/en/posts/#{source.id}\">#{source.id}</a>" end end
Version data entries
5 entries across 5 versions & 1 rubygems