Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
11df2875
Unverified
Commit
11df2875
authored
Mar 31, 2020
by
Andrew W. Lee
Committed by
GitHub
Mar 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add integration test for `rails g annotate:install` (#783)
Add integration test that calls on rails generator.
parent
1c1c5850
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
rails_5.2.4.1_spec.rb
spec/integration/rails_5.2.4.1_spec.rb
+16
-0
rails_6.0.2.1_spec.rb
spec/integration/rails_6.0.2.1_spec.rb
+16
-0
No files found.
spec/integration/rails_5.2.4.1_spec.rb
View file @
11df2875
...
@@ -152,4 +152,20 @@ describe 'Integration testing on Rails 5.2.4.1', if: IntegrationHelper.able_to_r
...
@@ -152,4 +152,20 @@ describe 'Integration testing on Rails 5.2.4.1', if: IntegrationHelper.able_to_r
end
end
end
end
end
end
describe
'rails g annotate:install'
do
let
(
:command
)
{
'bin/rails g annotate:install'
}
let
(
:rake_file_path
)
{
'lib/tasks/auto_annotate_models.rake'
}
it
'generates the rake file'
do
Bundler
.
with_clean_env
do
Dir
.
chdir
RAILS_5_2_APP_PATH
do
full_path
=
File
.
expand_path
(
rake_file_path
)
expect
{
`
#{
command
}
`
}.
to
change
{
File
.
exist?
(
rake_file_path
)
}.
from
(
false
).
to
(
true
)
File
.
delete
(
full_path
)
end
end
end
end
end
end
spec/integration/rails_6.0.2.1_spec.rb
View file @
11df2875
...
@@ -167,4 +167,20 @@ describe 'Integration testing on Rails 6.0.2.1', if: IntegrationHelper.able_to_r
...
@@ -167,4 +167,20 @@ describe 'Integration testing on Rails 6.0.2.1', if: IntegrationHelper.able_to_r
end
end
end
end
end
end
describe
'rails g annotate:install'
do
let
(
:command
)
{
'bin/rails g annotate:install'
}
let
(
:rake_file_path
)
{
'lib/tasks/auto_annotate_models.rake'
}
it
'generates the rake file'
do
Bundler
.
with_clean_env
do
Dir
.
chdir
RAILS_6_0_APP_PATH
do
full_path
=
File
.
expand_path
(
rake_file_path
)
expect
{
`
#{
command
}
`
}.
to
change
{
File
.
exist?
(
rake_file_path
)
}.
from
(
false
).
to
(
true
)
File
.
delete
(
full_path
)
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment