Sha256: bf347fd212d58e4d7dae1b29d8b7034fae3fa805ffac5b38e95549d5b50a9fae

Contents?: true

Size: 1005 Bytes

Versions: 8

Compression:

Stored size: 1005 Bytes

Contents

require 'spec_helper'

shared_examples "blog posts feature" do
  context "When access the index posts page" do
    before do
      click_link "PostsBlog#index"
    end

    it "javascript should insert a text" do
      page.should have_content("Blog::Posts index content")
    end
  end

  context "When access the new posts page" do
    before do
      click_link "PostsBlog#new"
    end

    it "javascript should insert a text" do
      page.should have_content("Blog::Posts new content")
    end
  end

  context "When access the show posts page" do
    before do
      click_link "PostsBlog#show"
    end

    it "javascript should insert a text" do
      page.should have_content("Blog::Posts show content")
    end
  end
end

describe "Blog posts without turbolinks", js: true do
  before do
    visit '/'
  end
  it_behaves_like "blog posts feature"
end

describe "Blog posts with turbolinks", js: true do
  before do
    visit '/?turbolinks=true'
  end
  it_behaves_like "blog posts feature"
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
initjs-2.2.0 spec/features/blog_posts_spec.rb
initjs-2.1.2 spec/features/blog_posts_spec.rb
initjs-2.1.1 spec/features/blog_posts_spec.rb
initjs-2.1.0 spec/features/blog_posts_spec.rb
initjs-2.0.0 spec/features/blog_posts_spec.rb
initjs-2.0.0.beta1 spec/features/blog_posts_spec.rb
initjs-1.0.1 spec/dummy/spec/features/blog_posts_spec.rb
initjs-1.0.0 spec/dummy/spec/features/blog_posts_spec.rb