From c02ee3001342b3cfed502624a6ef25c6b8320b18 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 1 Sep 2015 01:03:02 +0200 Subject: [PATCH] AutoCommit Die Sep 1 01:03:02 CEST 2015 --- Gemfile | 1 + spec/views/fetprofiles/show.html.erb_spec.rb | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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/)