forked from bofh/fetsite
AutoCommit Die Sep 1 01:03:02 CEST 2015
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -89,6 +89,7 @@ gem 'rspec-rails'
|
|||||||
gem 'minitest', "~>4.7.5"
|
gem 'minitest', "~>4.7.5"
|
||||||
gem 'rspec-collection_matchers'
|
gem 'rspec-collection_matchers'
|
||||||
gem 'rspec-activemodel-mocks'
|
gem 'rspec-activemodel-mocks'
|
||||||
|
gem 'rspec-html-matchers'
|
||||||
gem 'rspec-expectations'
|
gem 'rspec-expectations'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "fetprofiles/show", :type => :view do
|
describe "fetprofiles/show", :type => :view do
|
||||||
|
include RSpecHtmlMatchers
|
||||||
before(:each) do
|
before(:each) do
|
||||||
# @fetprofile =
|
# @fetprofile =
|
||||||
#assign(:fetprofile, stub_model(Fetprofile, FactoryGirl.attributes_for(:fetprofile)))
|
#assign(:fetprofile, stub_model(Fetprofile, FactoryGirl.attributes_for(:fetprofile)))
|
||||||
@@ -11,10 +12,11 @@ describe "fetprofiles/show", :type => :view do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "renders attributes in <p>" do
|
it "renders attributes in <p>" do
|
||||||
render_template "show"
|
render
|
||||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||||
|
puts rendered
|
||||||
# expect(rendered).to include_text @fetprofile.vorname
|
# expect(rendered).to include_text @fetprofile.vorname
|
||||||
rendered.should match(@fetprofile.vorname)
|
expect(rendered).to have_tag('div')
|
||||||
# rendered.should match(/Nachname/)
|
# rendered.should match(/Nachname/)
|
||||||
# rendered.should match(/Short/)
|
# rendered.should match(/Short/)
|
||||||
# rendered.should match(/Fetmailalias/)
|
# rendered.should match(/Fetmailalias/)
|
||||||
|
|||||||
Reference in New Issue
Block a user