README.md in magic_test-0.0.2 vs README.md in magic_test-0.0.3

- old
+ new

@@ -1,17 +1,13 @@ # Magic Test Magic Test allows you to write Rails system tests interactively through a combination of trial-and-error in a debugger session and also just simple clicking around in the application being tested, all without the slowness of constantly restarting the testing environment. -## Questions are Bugs! +> Magic Test is still in early development, and that includes the documentation. Any questions you have that aren't already address in the documentation should be [opened as issues](https://github.com/bullet-train-co/magic_test/issues/new) so they can be appropriately addressed in the documentation. -Magic Test is still in early development, and that includes the documentation. Any questions you have that aren't already address in the documentation should be [opened as issues](https://github.com/bullet-train-co/magic_test/issues/new) so they can be appropriately addressed in the documentation. - ## Installation -Magic Test currently requires your application to have jQuery enabled. - Add this line to your application’s `Gemfile`: ```ruby gem 'magic_test', group: :test ``` @@ -26,20 +22,20 @@ ``` rails g magic_test:install ``` -(If your application doesn't include jQuery, you'll need to let Magic Test know to include it as needed. Just add `no` to the end of the line above or adjust your configuration afterward in `config/initializers/magic_test.rb`. We'll only inject jQuery when Magic Test is actively running. It will never show up on CI.) +> If your application doesn't include jQuery, you'll need to let Magic Test know to include it as needed. Just add `no` to the end of the line above or adjust your configuration afterward in `config/initializers/magic_test.rb`. We'll only inject jQuery when Magic Test is actively running. It will never show up on CI. With this we will: - Create a sample system test at `test/system/basics_test.rb` that invokes Magic Test. - If your application was previously configured to run system tests with `:headless_chrome` or `:headless_firefox`, we will attempt to update your configuration so you can see the browser when you run tests with `MAGIC_TEST=1` as an environment variable. Finally, because it’s hard for us to do automatically, you will need to add the following before any closing `</head>` tags in any of the files in `app/views/layouts`: -``` +```ruby+erb <%= render 'magic_test/support' if Rails.env.test? %> ``` You should be done now! To review what we’ve done for you, be sure to do a `git diff` at this point and make sure our generators didn’t break anything! @@ -56,14 +52,13 @@ 2. **A browser** where you can click around the application and have your actions automatically converted into Capybara code. 3. **A editor** where you mostly just watch test code appear magically, but you can also edit it by hand should you need to. If you have the screen real estate, we recommend organizing the three windows so you can see them all at the same time. This is the intended Magic Test developer experience. -### Using Magic Test in New or Existing Tests +> #### Using Magic Test in New or Existing Tests +> Just add a call to `magic_test` anywhere you want to start interactively developing test behavior and run the test the same way we've described above. -Just add a call to `magic_test` anywhere you want to start interactively developing test behavior and run the test the same way we've described above. - ### Writing Tests Manually in the Debugger Console You’re now free to type Capybara commands in the debugger and see their results in the Chrome browser. If you type something and you’re with the result, type `ok` and hit enter to have the last line of code you wrote added to the test. When you’re done writing the test interactively, you can press <kbd>Control</kbd> + <kbd>D</kbd> to finish running the test. @@ -94,6 +89,6 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/bullet-train-co/magic_test. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License -The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). +The Ruby Gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).