diff options
| author | Alban Peignier | 2012-03-11 11:54:00 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2012-03-11 11:54:12 +0100 | 
| commit | dc8a6f7f9182996ea3f39986b45c3a71927a8e4a (patch) | |
| tree | f6c2e5c48a896dc43f8c0795eb1f557b82483c80 /spec/views | |
| parent | ae88454853f146acc6f1368a14e1180be2650d03 (diff) | |
| download | chouette-core-dc8a6f7f9182996ea3f39986b45c3a71927a8e4a.tar.bz2 | |
Add validations. Fixes specs
Diffstat (limited to 'spec/views')
| -rw-r--r-- | spec/views/lines/index.html.erb_spec.rb | 12 | ||||
| -rw-r--r-- | spec/views/lines/show.html.erb_spec.rb | 4 | 
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/views/lines/index.html.erb_spec.rb b/spec/views/lines/index.html.erb_spec.rb index a290080eb..ddd7d9c76 100644 --- a/spec/views/lines/index.html.erb_spec.rb +++ b/spec/views/lines/index.html.erb_spec.rb @@ -2,14 +2,14 @@ require 'spec_helper'  describe "/lines/index" do -  let!(:referential) { assign( :referential, Factory(:referential) ) } -  let!(:network) { Factory(:network) } -  let!(:company) { Factory(:company) } -  let!(:lines) { assign( :lines, Array.new(2) { Factory(:line, :network => network, :company => company) } )  }   +  let!(:referential) { assign :referential, Factory(:referential) } +  let!(:network) { Factory :network } +  let!(:company) { Factory :company } +  let!(:lines) { assign :lines, Array.new(2) { Factory(:line, :network => network, :company => company) }.paginate }   +  let!(:q) { assign :q, Ransack::Search.new(Chouette::Line) }    before :each do -    rendered.stub(:collection).and_return( lines.order_by [[:number, :asc]] )     -    view.stub(:link_to_order).and_return( "#" ) +    view.stub(:link_with_search).and_return("#")    end    it "should render a show link for each group" do         diff --git a/spec/views/lines/show.html.erb_spec.rb b/spec/views/lines/show.html.erb_spec.rb index 9d5b53cd3..edb7e8741 100644 --- a/spec/views/lines/show.html.erb_spec.rb +++ b/spec/views/lines/show.html.erb_spec.rb @@ -2,8 +2,8 @@ require 'spec_helper'  describe "/lines/show" do -  let!(:referential) { assign(:referential, Factory(:referential)) } -  let!(:line) { assign(:line, Factory(:line)) } +  let!(:referential) { assign :referential, Factory(:referential) } +  let!(:line) { assign :line, Factory(:line) }    it "should render h2 with the line name" do      render  | 
