Sha256: dac3f404325275aee9b3b15a0727d0b6c548832f1aad1d2c1ad442d26c81c3c5

Contents?: true

Size: 831 Bytes

Versions: 10

Compression:

Stored size: 831 Bytes

Contents

require "spec_helper"

RSpec.describe "Draper" do
  before :all do
    drop_dummy_database
    remove_project_directory
    create_dummy_project("draper" => true, "api" => true)
  end

  it "adds the Draper gem to Gemfile" do
    gemfile_content = IO.read("#{project_path}/Gemfile")
    expect(gemfile_content).to include("gem 'draper'")
  end

  it "adds the Draper brief to README file" do
    readme = IO.read("#{project_path}/README.md")
    expect(readme).to include("Draper")
  end

  it "adds api responder to work with draper" do
    responder_content = IO.read("#{project_path}/app/responders/api_responder.rb")
    expect(responder_content).to include("decorated_resource")
  end

  it "adds decorators directory" do
    content = IO.read("#{project_path}/app/decorators/.keep")
    expect(content).to be_empty
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
potassium-6.0.0 spec/features/draper_spec.rb
potassium-5.2.3 spec/features/draper_spec.rb
potassium-5.2.2 spec/features/draper_spec.rb
potassium-5.2.1 spec/features/draper_spec.rb
potassium-5.2.0 spec/features/draper_spec.rb
potassium-5.1.4 spec/features/draper_spec.rb
potassium-5.1.3 spec/features/draper_spec.rb
potassium-5.1.2 spec/features/draper_spec.rb
potassium-5.1.1 spec/features/draper_spec.rb
potassium-3.0.0 spec/features/draper_spec.rb