Sha256: dbe506615a47e147e3ce42ba6f7afbb50d28e337e8a03a5f681258ba77a6b540

Contents?: true

Size: 960 Bytes

Versions: 1

Compression:

Stored size: 960 Bytes

Contents

require 'spec_helper'
require 'support/dummy_app'
require 'support/matchers/have_text'

app = DummyApp.new(ENV["RAILS_ENV"])

app.start_server do
  {view: "/posts/1", mailer: "/posts/1/mail"}.each do |type, path|
    page = app.get(path)

    describe "in a #{type}" do
      it "runs in the correct environment" do
        page.should have_text(app.environment).in("#environment")
      end

      it "can use path helpers with a model" do
        page.should have_text("/en/posts/1").in("#path_with_model")
      end

      it "can use path helpers with an id" do
        page.should have_text("/en/posts/1").in("#path_with_id")
      end

      it "can use url helpers with a model" do
        page.should have_text("http://www.example.com:12345/en/posts/1").in("#url_with_model")
      end

      it "can use url helpers with an id" do
        page.should have_text("http://www.example.com:12345/en/posts/1").in("#url_with_id")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
draper-1.0.0 spec/integration/integration_spec.rb