You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
I think we should create a test codebase to check that every recipe works. This is a nice to have when we update rails gems, or perform a refactor in the code.
I suggest:
A way to run the wizard in a headless mode to generate a valid app
Make simple tests to be sure that the dependencies are properly setted up (for example, that rspec doesn't fail, or /admin returns a 200 response for active_admin)
What do you think?
The text was updated successfully, but these errors were encountered:
Testing manually is starting to be painful. I agree that we need to provide some kind of automated testing.
Running the wizard in a headless mode is easy. We only need to create tmp directories and work on these tmp directories.
Executing commands via Ruby is easy (also checking result codes). If we want to go low level, we can also read files (File.read) and check that some strings are added there.
Within the testing issue I took the time to add something in this line. The testing recipe generates these specs:
RSpec.describe 'Dependencies' do
it('has rspec') { true == true }
it('has FakeRedis') { expect(FakeRedis).to_not be nil }
it('has DatabaseCleaner') { expect(DatabaseCleaner).to_not be nil }
it('has shoulda_matchers') { expect(self).to respond_to :is_expected }
it('has Faker') { expect(Faker::Robin.quote).to include 'Holy' }
end
RSpec.describe 'System', type: :system do
it 'has integration tests' do
visit('/404')
expect(page).to have_content("The page you were looking for doesn't exist")
end
end
In these cases I assume that they are both working specs, and also a bit of boilerplate to let the user see where specs should be written, and also what dependencies are installed (and indeed are working).
Something similar for the rest of features (we can discuss if export them as actually testing codebase in the new app or don't) would be nice. This way we'll have regression tests to update versions without fear. Also assert result codes for tasks could be useful. The approach may depend in the recipe itself, I think.
I think we should create a test codebase to check that every recipe works. This is a nice to have when we update rails gems, or perform a refactor in the code.
I suggest:
rspec
doesn't fail, or /admin returns a 200 response for active_admin)What do you think?
The text was updated successfully, but these errors were encountered: