summaryrefslogtreecommitdiff
path: root/spec/views/pms/index.html.erb_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/pms/index.html.erb_spec.rb')
-rw-r--r--spec/views/pms/index.html.erb_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/views/pms/index.html.erb_spec.rb b/spec/views/pms/index.html.erb_spec.rb
new file mode 100644
index 0000000..a3bc733
--- /dev/null
+++ b/spec/views/pms/index.html.erb_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe "pms/index" do
+ before(:each) do
+ assign(:pms, [
+ stub_model(Pm,
+ :author => nil,
+ :recipient => nil,
+ :message => "MyText"
+ ),
+ stub_model(Pm,
+ :author => nil,
+ :recipient => nil,
+ :message => "MyText"
+ )
+ ])
+ end
+
+ it "renders a list of pms" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "tr>td", :text => nil.to_s, :count => 2
+ assert_select "tr>td", :text => nil.to_s, :count => 2
+ assert_select "tr>td", :text => "MyText".to_s, :count => 2
+ end
+end