Data dodania Pytanie
2017-05-20 19:05 Increase Rails testing time precision »
We're noticing over time that as our machines get more performant, we end up with more Rails specs with timing issues where it appears that timestamps...
(1) odpowiedzi
2017-05-20 11:05 Rails and RSpec database transaction »
I am struggling to mock out the database tests for the following code, which uses two different databases: ActiveRecord::Base.transaction do ...
(1) odpowiedzi
2017-05-19 23:05 Testing a service object job with rspec »
I have the following job: class Test::MooJob < ApplicationJob queue_as :onboarding def perform avariable = Test::AragornService.build("a...
(1) odpowiedzi
2017-05-19 23:05 Why don't any of my rspec or cucumber tests run locally? »
I have inherited a rails app which has an extensive suite of rspec and cucumber tests, when I run these tests on a CI server such as Circle, I see the...
(0) odpowiedzi
2017-05-19 22:05 Rspec RakeTask; setting up dependent tasks »
I am using Rspec to run smoke tests, and have been looking to make changes to my RakeFile using dependent tasks This is what I am doing right now: n...
(0) odpowiedzi
2017-05-18 22:05 expected #status to have initially been "ready_for_publish", but was "ready" »
I tried to test some Rails model repeatedly. But errors like this make me annoying. What should I do for the test? The Error is below. Failures: ...
(1) odpowiedzi
2017-05-18 17:05 Could not log "render_template.action_view" event after rails upgrade to 4.2.8 »
I am in the process of upgrading a rails app that mostly serves JSON. The last working version I was able to upgrade to is 4.1. Once I upgraded to 4.2...
(1) odpowiedzi
2017-05-18 14:05 How to test nokogiri parsed page? »
I have a parsed nokogiri page. I need to write a test which testing that parsed data is correctly. Which should I use to test? Here is nokogiri parse...
(0) odpowiedzi
2017-05-17 23:05 Why isn't rack-cors filtering incoming requests, according to Rspec »
I'd like my Rails 5 API-only app, for now running on http://localhost:3000, to only accept requests from my NodeJS front-end app, for now running on h...
(1) odpowiedzi
2017-05-17 05:05 Rspec error using ruby script: "cannot load such file -- ./components/tasks.rb" (ruby app not rails) »
I am trying to build my Rspec testing test to test out a ruby app I am building. I know I should build first but test later. The code does work 100% ...
(1) odpowiedzi
2017-05-17 01:05 Use rspec let with array elements »
I have a function func that returns an array with two arguments which I normally use as follows: heads, tails = func so in an rspec test, I would l...
(1) odpowiedzi
2017-05-16 22:05 How to test a specific method in a controller »
I have a spec in my controller called clone in which I take a user and clone the duplicate the user. What I need to do is within my controller (my ...
(1) odpowiedzi
2017-05-16 10:05 How do I express 'Back' submit button on RSpec controller test? »
How do I express 'Back' submit button on RSpec controller test? Here's my controller. def create @article = Article.new(article_params) if ...
(0) odpowiedzi
2017-05-16 08:05 How can I fix my selenium and geckodriver bug on Cloud9? »
I want to fix my selenium and geckodriver bug on Cloud9 using capybara and launchy. When I tried to feature tests using Rspec, the errors occurred. ...
(1) odpowiedzi
2017-05-15 21:05 Show only fail reasons when running rspec tests »
When running a test on the command line which fails usually it shows something like this example: (See full trace by running task with --trace) F Fa...
(1) odpowiedzi
2017-05-15 18:05 How do we test interactor organizers using rspec? »
I want to test below organizer interactor for, calling the 2 specified interactors without executing the calling interactors('SaveRecord, PushToServic...
(1) odpowiedzi
2017-05-15 13:05 Allure-rspec -Unable to see any data in HTML report »
This is a sample code by @tourdedave require 'allure-rspec' require 'selenium-webdriver' require 'uuid' RSpec.configure do |config| config.include...
(1) odpowiedzi
2017-05-14 17:05 Testing helper method with using method in the controller »
module ApplicationHelper def sortable(column, title = nil) title ||= column css_class = column == sort_column ? "current #{sort_direction}" : nil dir...
(1) odpowiedzi
2017-05-14 05:05 RSpec / FactoryGirl - Rails STI - equality »
Simplified Example: I recently setup Single Table Inheritance on an Animal model. Cat and Dog are subclasses of Animal. I have an Animal factory : ...
(1) odpowiedzi
2017-05-14 00:05 How to output values of rspec subject to debug? »
I can't figure out why my validation is failing. How can I output the value of my rspec subject i.e. model built from factory_girl I am doing this ...
(1) odpowiedzi
2017-05-13 09:05 Rails Spec Controller Test failing with custom route »
Rails 5.1 RSpec 3.6 I have a Controller: class SessionController < ApplicationController def new end end A custom route: get 'login' =>...
(2) odpowiedzi
2017-05-13 09:05 How to solve ActiveRecord::RecordNotFound? »
I can't figure out why RSpec put error. The error message is bellows. 1) ArticlesController POST #update with valid params assigns the article as @...
(2) odpowiedzi
2017-05-13 00:05 How to write an integration test for a loop? »
I am having difficulty writing integration (no stubbing) tests for the following scenario: a process (rake task) that runs in a loop, emitting some va...
(1) odpowiedzi
2017-05-12 23:05 Rspec concatenate expect statements »
expect(a).not_to be(6).or expect(a).to eq(6).and expect(b).to eq(3) This code is not executable. But what I'm trying to test is this statement: (a...
(0) odpowiedzi
2017-05-12 14:05 Error while running allure command line generate command »
I just got my allure framework done .. but while generating HTML report with command line I get following error Exception in thread "main" java.lang....
(1) odpowiedzi
2017-05-12 01:05 Two instances of rspec, do they interfere with each other? »
I've been fiddling with Guard trying to get it to load rspec tests, but it's throwing some errors about the test schema. I realised that I had rspec ...
(0) odpowiedzi
2017-05-11 23:05 Unable to test Rails controller redirect_to »
I am trying to stub a Rails 4 controller with: allow(controller).to receive(:redirect_to).with('path').and_return(nil) And then test later with: i...
(0) odpowiedzi
2017-05-11 16:05 rails - Objects persisted by FactoryGirl are not available in Controller »
I am writing tests for my controllers in admin namespace. Using RSpec (3.5.0), FactoryGirl (4.8.0), DatabaseCleaner (1.5.3) and Mongoid (6.0.3). The ...
(1) odpowiedzi
2017-05-11 14:05 Rspec test failing against Docker container »
DISCLAIMER: I am new to ruby,rspec etc. I am trying to find a test framework for my docker containers I have a docker container that runs the aws cli...
(1) odpowiedzi
2017-05-11 03:05 Using Let to build multiple instances of a model »
I'm trying to run a test on will_paginate. I know that it technically works, but I can't get the spec to work because of my inability to create multip...
(3) odpowiedzi
2017-05-10 11:05 How can I get verbatim href attribute »
I have a page-internal link in an html page: <div class="bar"> <a href="#foo">Go to foo</a> </div> I selected this anchor...
(1) odpowiedzi
2017-05-10 00:05 How to perform non-fresh logins using Devise/Rspec/Capybara/Poltergeist? »
While performing integration/system tests with rspec/capybara/poltergeist, I am trying to test non-fresh logins using Devise. before(:each) do ...
(1) odpowiedzi
2017-05-10 00:05 undefined method `have' for #<Object:0x007f997fabf778> (NoMethodError) »
I am getting a undefined method error message for the 'have' method. expect(@gymhomepage.find_your_local_gym).to have(@gymhomepage.find_your_local_...
(1) odpowiedzi
2017-05-09 19:05 How to solve the the Curl's "Couldn't connect to server" »
I'm using Rspec with Capybara with WebMock for my tests (also I'm using Charles proxy), Getting the following error, never in a specific test. I've h...
(0) odpowiedzi
2017-05-09 14:05 Define multiple custom records using FactoryGirl »
I have a hash of key and values that I would like to be created using FactoryGirl. I went through a POST with similar requirements, but couldn't under...
(1) odpowiedzi