mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Apply standard formatting to address errors in specs
What? ===== This applies standard's formatting fixes across the codebase.
This commit is contained in:
parent
fc098ffbc3
commit
6244b5de55
4 changed files with 12 additions and 12 deletions
|
@ -6,9 +6,9 @@ describe "a generated attributes hash" do
|
||||||
define_model("Comment")
|
define_model("Comment")
|
||||||
|
|
||||||
define_model("Post", title: :string,
|
define_model("Post", title: :string,
|
||||||
body: :string,
|
body: :string,
|
||||||
summary: :string,
|
summary: :string,
|
||||||
user_id: :integer) do
|
user_id: :integer) do
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
has_many :comments
|
has_many :comments
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,9 @@ describe "a generated attributes hash where order matters" do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
define_model("ParentModel", static: :integer,
|
define_model("ParentModel", static: :integer,
|
||||||
evaluates_first: :integer,
|
evaluates_first: :integer,
|
||||||
evaluates_second: :integer,
|
evaluates_second: :integer,
|
||||||
evaluates_third: :integer)
|
evaluates_third: :integer)
|
||||||
|
|
||||||
FactoryBot.define do
|
FactoryBot.define do
|
||||||
factory :parent_model do
|
factory :parent_model do
|
||||||
|
|
|
@ -5,10 +5,10 @@ describe "a generated stub instance" do
|
||||||
define_model("User")
|
define_model("User")
|
||||||
|
|
||||||
define_model("Post", title: :string,
|
define_model("Post", title: :string,
|
||||||
body: :string,
|
body: :string,
|
||||||
age: :integer,
|
age: :integer,
|
||||||
user_id: :integer,
|
user_id: :integer,
|
||||||
draft: :boolean) do
|
draft: :boolean) do
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ describe "attribute overrides" do
|
||||||
before do
|
before do
|
||||||
define_model("User", admin: :boolean)
|
define_model("User", admin: :boolean)
|
||||||
define_model("Post", title: :string,
|
define_model("Post", title: :string,
|
||||||
secure: :boolean,
|
secure: :boolean,
|
||||||
user_id: :integer) do
|
user_id: :integer) do
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
def secure=(value)
|
def secure=(value)
|
||||||
|
|
Loading…
Reference in a new issue