Sha256: 73e13b0bac31e765abf72d7527c6fdc1b0a385c8b76861afa8ef7b0d018addb9
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
Contents
require "spec_helper" require "rubocop" RSpec.describe "A new project" do before(:all) do drop_dummy_database remove_project_directory create_dummy_project end it "is correctly bundled" do expect { on_project { `bundle exec rails -v` } }.to_not output.to_stderr end it "is a valid rubocop project" do on_project do expect(run_rubocop).to eq(true) end end it "configures postgresql" do database_config_file = IO.read("#{project_path}/config/database.yml") gemfile = IO.read("#{project_path}/Gemfile") expect(database_config_file).to include(%{adapter: postgresql}) expect(gemfile).to include %{gem 'pg'} end it "configures the correct ruby version" do ruby_version_file = IO.read("#{project_path}/.ruby-version") expect(ruby_version_file).to eq("2.3") end context "seeds related issues" do it "creates fake data loader module" do content = IO.read("#{project_path}/lib/fake_data_loader.rb") expect(content).to include %{module FakeDataLoader} end it "creates load fake data task" do content = IO.read("#{project_path}/lib/tasks/db/fake_data.rake") expect(content).to include %{FakeDataLoader.load} end it "overrides default seed file" do content = IO.read("#{project_path}/db/seeds.rb") expect(content).to include %{without duplicating the information} end end end
Version data entries
5 entries across 5 versions & 1 rubygems