test harness is back, and pages fixed after refactor
This commit is contained in:
11
spec/features/merged/changes_spec.rb
Normal file
11
spec/features/merged/changes_spec.rb
Normal file
@ -0,0 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.feature "Changes", type: :feature do
|
||||
describe "GET /changes" do
|
||||
it "returns http success" do
|
||||
visit "/merged/changes"
|
||||
expect(page).to have_title("Merged")
|
||||
expect(page).to have_text("Pages")
|
||||
end
|
||||
end
|
||||
end
|
11
spec/features/merged/images_spec.rb
Normal file
11
spec/features/merged/images_spec.rb
Normal file
@ -0,0 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.feature "Images", type: :feature do
|
||||
describe "GET /images" do
|
||||
it "returns http success" do
|
||||
visit "/merged/images"
|
||||
expect(page).to have_title("Merged")
|
||||
expect(page).to have_text("Pages")
|
||||
end
|
||||
end
|
||||
end
|
17
spec/features/merged/page_spec.rb
Normal file
17
spec/features/merged/page_spec.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.feature "Pages", type: :feature do
|
||||
describe "GET /pages" do
|
||||
it "returns http success" do
|
||||
visit "/merged/pages"
|
||||
expect(page).to have_title("Merged")
|
||||
expect(page).to have_text("Pages")
|
||||
end
|
||||
end
|
||||
describe "index page" do
|
||||
it "returns http success" do
|
||||
visit "/merged/pages"
|
||||
click_on ("index")
|
||||
end
|
||||
end
|
||||
end
|
19
spec/features/merged/section_spec.rb
Normal file
19
spec/features/merged/section_spec.rb
Normal file
@ -0,0 +1,19 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.feature "Sections", type: :feature do
|
||||
describe "index page" do
|
||||
it "returns http success" do
|
||||
visit "/merged/pages"
|
||||
click_on ("index")
|
||||
expect(page).to have_text("index")
|
||||
expect(page).to have_text("Section 1")
|
||||
end
|
||||
end
|
||||
describe "show page" do
|
||||
it "returns http success" do
|
||||
visit "/merged/pages"
|
||||
click_on ("index")
|
||||
find_link("Edit").click
|
||||
end
|
||||
end
|
||||
end
|
11
spec/features/merged/style_spec.rb
Normal file
11
spec/features/merged/style_spec.rb
Normal file
@ -0,0 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.feature "Styles", type: :feature do
|
||||
describe "GET /styles" do
|
||||
it "returns http success" do
|
||||
visit "/merged/styles/index"
|
||||
expect(page).to have_title("Merged")
|
||||
expect(page).to have_text("Pages")
|
||||
end
|
||||
end
|
||||
end
|
17
spec/models/merged/option_spec.rb
Normal file
17
spec/models/merged/option_spec.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require 'rails_helper'
|
||||
|
||||
module Merged
|
||||
RSpec.describe Option, type: :model do
|
||||
let(:first) {Option.options.values.first}
|
||||
|
||||
it "has Option.options" do
|
||||
expect(Option.options.class).to be Hash
|
||||
end
|
||||
it "there are options" do
|
||||
expect(Option.options.length).to be 12
|
||||
end
|
||||
it "has option objects" do
|
||||
expect(first.class).to be Option
|
||||
end
|
||||
end
|
||||
end
|
@ -1,3 +1,4 @@
|
||||
require 'capybara/rspec'
|
||||
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
||||
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
||||
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
||||
|
Reference in New Issue
Block a user