-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from mugijiru/add-rubocop-extensions
- Loading branch information
Showing
18 changed files
with
67 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe TodoItem, type: :model do | ||
RSpec.describe TodoItem do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe User, type: :model do | ||
RSpec.describe User do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
DatabaseRewinder.clean_all | ||
end | ||
|
||
config.before(:each) do | ||
config.before do | ||
DatabaseRewinder.clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
RSpec.configure do |config| | ||
config.include FactoryBot::Syntax::Methods | ||
|
||
config.before(:each) do | ||
config.before do | ||
FactoryBot.rewind_sequences | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe 'Todo Items', type: :system do | ||
RSpec.describe 'Todo Items' do | ||
let(:user) { create(:user, email: '[email protected]') } | ||
|
||
before do | ||
@user = create(:user, email: '[email protected]') | ||
login_as(@user) | ||
login_as(user) | ||
end | ||
|
||
it 'display user email' do | ||
|
@@ -13,16 +14,16 @@ | |
end | ||
|
||
it 'display registered todo items' do | ||
create_list(:todo_item, 10, user: @user) | ||
create_list(:todo_item, 10, user: user) | ||
|
||
visit '/todo_items' | ||
|
||
expect(page).to have_content 'TODO item 10' | ||
end | ||
|
||
it 'hide comopleted todo items when switched hidden' do | ||
create_list(:todo_item, 5, user: @user, name: "Completed Todo Item", is_completed: true) | ||
create_list(:todo_item, 5, user: @user) | ||
create_list(:todo_item, 5, user: user, name: "Completed Todo Item", is_completed: true) | ||
create_list(:todo_item, 5, user: user) | ||
|
||
visit '/todo_items' | ||
|
||
|
@@ -38,7 +39,7 @@ | |
end | ||
|
||
it 'can create new todo item' do | ||
create_list(:todo_item, 10, user: @user) | ||
create_list(:todo_item, 10, user: user) | ||
|
||
visit '/todo_items' | ||
|
||
|
@@ -56,7 +57,7 @@ | |
end | ||
|
||
it 'can edit existing todo item' do | ||
create_list(:todo_item, 10, user: @user) | ||
create_list(:todo_item, 10, user: user) | ||
|
||
visit '/todo_items' | ||
|
||
|
@@ -78,7 +79,7 @@ | |
end | ||
|
||
it 'can delete existing todo item' do | ||
create_list(:todo_item, 10, user: @user) | ||
create_list(:todo_item, 10, user: user) | ||
|
||
visit '/todo_items' | ||
|
||
|