diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 8d06915..7dead21 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -23,3 +23,22 @@ jobs: run: ./specs_e2e/rails_6_1/test.sh env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + + rails_7_2: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.3 + bundler-cache: true + - name: Run tests + run: bundle exec rake + - run: gem uninstall -v '>= 2' -ax bundler || true + - run: gem install bundler -v '< 2' + - name: Run interaction tests + run: ./specs_e2e/rails_7_2/test.sh + env: + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/specs_e2e/rails_4_2/.gitignore b/specs_e2e/rails_4_2/.gitignore deleted file mode 100644 index e30f11c..0000000 --- a/specs_e2e/rails_4_2/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.bundle -spec/node_modules -spec/cypress.config.js -spec/package.json -spec/yarn.lock -spec/cypress -spec/app_commands -config/initializers/cypress_on_rails.rb -vendor/bundle -tmp/pids -tmp/cache -log/*.* \ No newline at end of file diff --git a/specs_e2e/rails_4_2/Gemfile b/specs_e2e/rails_4_2/Gemfile deleted file mode 100644 index 835f8b5..0000000 --- a/specs_e2e/rails_4_2/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source 'https://rubygems.org' - -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 4.2.10' -gem 'sprockets', '~> 3.7.2' - -group :development, :test do - gem 'vcr' - gem 'webmock' - gem 'cypress-on-rails', path: '../../' -end diff --git a/specs_e2e/rails_4_2/README.rdoc b/specs_e2e/rails_4_2/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/specs_e2e/rails_4_2/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js b/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js deleted file mode 100644 index dee720f..0000000 --- a/specs_e2e/rails_4_2/app/assets/javascripts/using_vcr.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css b/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css deleted file mode 100644 index afad32d..0000000 --- a/specs_e2e/rails_4_2/app/assets/stylesheets/using_vcr.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/specs_e2e/rails_4_2/app/controllers/application_controller.rb b/specs_e2e/rails_4_2/app/controllers/application_controller.rb deleted file mode 100644 index d83690e..0000000 --- a/specs_e2e/rails_4_2/app/controllers/application_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ApplicationController < ActionController::Base - # Prevent CSRF attacks by raising an exception. - # For APIs, you may want to use :null_session instead. - protect_from_forgery with: :exception -end diff --git a/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb b/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb deleted file mode 100644 index c12d0c5..0000000 --- a/specs_e2e/rails_4_2/app/controllers/using_vcr_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class UsingVcrController < ApplicationController - def index - end - - def record_cats - uri = URI('https://cat-fact.herokuapp.com/facts') - res = Net::HTTP.get_response(uri) - @cat_facts = JSON.parse(res.body) - end -end diff --git a/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb b/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb deleted file mode 100644 index f9b859b..0000000 --- a/specs_e2e/rails_4_2/app/controllers/welcome_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class WelcomeController < ApplicationController - def index - end -end diff --git a/specs_e2e/rails_4_2/app/models/post.rb b/specs_e2e/rails_4_2/app/models/post.rb deleted file mode 100644 index 39d49dd..0000000 --- a/specs_e2e/rails_4_2/app/models/post.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Post < OpenStruct - def self.create!(attributes) - create(attributes) - end - - def self.create(attributes) - @all ||= [] - post = new(attributes) - @all << post - post.id = @all.index(post) - attributes['id'] = @all.index(post) - attributes - end - - def self.all - @all ||= [] - @all - end - - def self.delete_all - @all = [] - end -end diff --git a/specs_e2e/rails_4_2/app/views/layouts/application.html.erb b/specs_e2e/rails_4_2/app/views/layouts/application.html.erb deleted file mode 100644 index fa24141..0000000 --- a/specs_e2e/rails_4_2/app/views/layouts/application.html.erb +++ /dev/null @@ -1,12 +0,0 @@ - - - - Rails42X - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb b/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb deleted file mode 100644 index 956c65f..0000000 --- a/specs_e2e/rails_4_2/app/views/using_vcr/index.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Using VCR

-
-  <%= JSON.pretty_generate VCR.configuration.as_json['default_cassette_options'] %>
-
- -<%= link_to 'Record Cats', { action: :record_cats } %> \ No newline at end of file diff --git a/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb b/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb deleted file mode 100644 index b1f9f4a..0000000 --- a/specs_e2e/rails_4_2/app/views/using_vcr/record_cats.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -

Record from Cats API

- -