diff --git a/Gemfile b/Gemfile index ac707dc..9d1a94e 100755 --- a/Gemfile +++ b/Gemfile @@ -89,6 +89,7 @@ gem 'rspec-rails' gem 'minitest', "~>4.7.5" gem 'rspec-collection_matchers' gem 'rspec-activemodel-mocks' +gem 'rspec-html-matchers' gem 'rspec-expectations' end diff --git a/spec/views/fetprofiles/show.html.erb_spec.rb b/spec/views/fetprofiles/show.html.erb_spec.rb index a79e4d7..c0a3d81 100644 --- a/spec/views/fetprofiles/show.html.erb_spec.rb +++ b/spec/views/fetprofiles/show.html.erb_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe "fetprofiles/show", :type => :view do + include RSpecHtmlMatchers before(:each) do # @fetprofile = #assign(:fetprofile, stub_model(Fetprofile, FactoryGirl.attributes_for(:fetprofile))) @@ -11,10 +12,11 @@ describe "fetprofiles/show", :type => :view do end it "renders attributes in
" do - render_template "show" + render # Run the generator again with the --webrat flag if you want to use webrat matchers + puts rendered # 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(/Short/) # rendered.should match(/Fetmailalias/)