Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 6017e85

Browse files
committed
Disable RSpec monkey patching
We take a pretty hard stance against monkey patching so we should be consistent. Skipping doesn't add much, and it's more explicit this way.
1 parent e340004 commit 6017e85

12 files changed

Lines changed: 13 additions & 18 deletions

File tree

spec/main/actions/books/create_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "spec_helper"
44

5-
describe Main::Actions::Books::Create, :db do
5+
RSpec.describe Main::Actions::Books::Create, :db do
66
let(:action) { Main::Actions::Books::Create.new(book_repository: repository) }
77
let(:repository) { instance_double(Main::Repositories::BookRepository) }
88

spec/main/actions/books/index_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "spec_helper"
44

5-
describe Main::Actions::Books::Index do
5+
RSpec.describe Main::Actions::Books::Index do
66
let(:action) { Main::Actions::Books::Index.new }
77
let(:params) { {} }
88

spec/main/actions/books/new_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "spec_helper"
44

5-
describe Main::Actions::Books::New do
5+
RSpec.describe Main::Actions::Books::New do
66
let(:action) { Main::Actions::Books::New.new }
77
let(:params) { {} }
88

spec/main/entities/book_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
module Main
77
module Entities
8-
describe Book do
8+
RSpec.describe Book do
99
it "can be created with Factory.structs" do
1010
# This wouldn't be in a real codebase. It's just for education
1111
book = Factory.structs[:book]

spec/main/features/add_book_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "features_helper"
44

5-
describe "Add a book", :db do
5+
RSpec.describe "Add a book", :db do
66
it "can create a new book" do
77
visit "/books/new"
88

spec/main/features/list_books_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "features_helper"
44

5-
describe "List books", :db do
5+
RSpec.describe "List books", :db do
66
let(:repository) { Main::Slice.container["repositories.book_repository"] }
77

88
before do

spec/main/features/visit_home_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "features_helper"
44

5-
describe "Visit home" do
5+
RSpec.describe "Visit home" do
66
it "is successful" do
77
visit "/"
88

spec/main/repositories/book_repository_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module Main
66
module Repositories
7-
describe BookRepository do
7+
RSpec.describe BookRepository do
88
# place your tests here
99
end
1010
end

spec/main/views/books/create_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require "spec_helper"
44
require "hanami/view"
55

6-
describe Main::Views::Books::Create do
6+
RSpec.describe Main::Views::Books::Create do
77
let(:view) { Main::Views::Books::Create.new }
88
let(:rendered) { view.call(params: params).to_s }
99
let(:params) { instance_double(Hanami::Action::Params, valid?: true) }

spec/main/views/books/index_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "spec_helper"
44

5-
describe Main::Views::Books::Index do
5+
RSpec.describe Main::Views::Books::Index do
66
let(:view) { Main::Views::Books::Index.new }
77
let(:books) { Array[] }
88
let(:rendered) { view.call(books: books) }

0 commit comments

Comments
 (0)