Data dodania Pytanie
2017-03-27 12:03 how to fix mismatched arity deprecation in RSpec 2.99.2 »
I am migrating from RSpec 2 to RSpec 3. While trying to remove all deprecations with Rspec 2.99.2, I have resolved all other deprecations. Except, s...
(1) odpowiedzi
2017-03-26 23:03 How should I load VCR results in a Turnip acceptance spec? »
I have a web request that ultimately calls an external service, merges data in our db, then presents results. I think I can ignore a JS based setup ...
(0) odpowiedzi
2017-03-26 23:03 Rails SystemStackError: stack level too deep »
I am testing my app ( Rails 5) with rspec capybara and factory girl I have the following error... I am not sure what's happening... I am very new with...
(1) odpowiedzi
2017-03-26 00:03 Data corrupted when passed from one Ruby method to another? »
I'm trying to pass several parameters of class Integer to one of two methods—the pick is determined by the final parameter passed to the initial met...
(2) odpowiedzi
2017-03-25 15:03 Rspec testing, Capybara unable to find link or button »
This the part of my requests test that fails: scenario 'Admin destroys a job posting + gets notified' do parent = create(:parent) create(:assig...
(1) odpowiedzi
2017-03-25 12:03 RSpec why is before(:each) never executed? »
I have this simple code require 'json' module Html class JsonHelper attr_accessor :path def initialize(path) @path = path end ...
(1) odpowiedzi
2017-03-25 10:03 Rspec test does what it should but displays failure »
I'm working on a model test which looks like this: require 'rails_helper' RSpec.describe Demand, type: :model do it 'has a valid factory' do ex...
(1) odpowiedzi
2017-03-24 23:03 Does .rspec file get run every time rspec runs? »
Does the .rspec file you get when initializing the project, get run every time you run your tests (through rspec [file location]) ? Just curious becau...
(1) odpowiedzi
2017-03-24 16:03 RSpec incorrectly adds id parameter in index routing test »
I have a /bar/foos path that routes to FoosController. GETting /bar/foos routes to FoosController#index, which works as expected when testing manually...
(0) odpowiedzi
2017-03-24 01:03 Rspec: test if method was called on an object inside a job? »
I made a job to call a method if ended_at was less than today. For some reason I keep getting failures even if I throw a binding pry right at the mome...
(1) odpowiedzi
2017-03-23 22:03 rspec test for passing params into a controller »
I am having trouble setting up a spec for something that I did. I know that it is working the way I want it to because i've manually tested this, but ...
(1) odpowiedzi
2017-03-23 15:03 rspec for chef resources »
I am new to rspec and I tried to write a spec test my cookbook, but it's failing. When I tried to test "chef exec rspec", it's unable to find resource...
(1) odpowiedzi
2017-03-23 01:03 Spec is not hitting the controller action in Rails API project »
I have a request spec where it should hit the show action in the AnagramsController. This is what my routes file looks like resources :anagrams, only...
(1) odpowiedzi
2017-03-22 19:03 Why do rspec filter hooks only work with arrow syntax? »
In RSpec tests, I'm using hooks/flags to run subsets of tests, similar to what is shown in the examples # spec_helper.rb RSpec.configure do |c| c.f...
(1) odpowiedzi
2017-03-22 14:03 `require': cannot load such file -- ./controllers/<controller> (LoadError) with Rspec »
I'm trying to run a test file for a controller, but I'm running into this error: /home/mariana/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/acti...
(1) odpowiedzi
2017-03-22 02:03 How to share rspec examples across multiple apps? »
I have a bunch of Rails applications that need to run the same rspec examples. These specs are about enforcing consistent conventions across the organ...
(2) odpowiedzi
2017-03-21 16:03 How to set a float number correctly for rspec/capybara/selenium according to the current locale »
I'm using rspec, capybara and selenium webdriver with firefox for RoR testing. If I set an HTML input number field in my spec, e.g: find('input_selec...
(1) odpowiedzi
2017-03-21 10:03 Rspec - Elasticsearch automatic callbacks running in before(:all) but not in before(:each) »
When I create a record in before(:all) in rspec, the index also gets created but it does not work in before(:each). Why is this happening? For exampl...
(0) odpowiedzi
2017-03-21 09:03 rspec request spec how to send download file using send_file »
How do I test a download method having following code with a request spec? def download send_file @some_doc.file.path, :type => @some_doc.fi...
(0) odpowiedzi
2017-03-20 22:03 FactoryGirl undefined method `create=' »
I'm basically getting an error when I'm trying to use a factory I created for a Post model in Ruby on Rails. Here's the full error: Failure/Error: ...
(1) odpowiedzi
2017-03-20 22:03 Using before blocks result in failing Rspec tests »
I'm having some issues using the before block in Rspec. In the code below, I am unable to remove the allow(plane).to receive(:land_plane) lines. In th...
(1) odpowiedzi
2017-03-20 10:03 bundle exec rspec spec/requests/static_pages_spec.rb and error »
I am using Michael Hartl's ruby on rail tutorial. When I try to execute the command:bundle exec rspec spec/requests/static_pages_spec.rb I get the f...
(1) odpowiedzi
2017-03-20 07:03 Skip_callbacks - Not working Rails 5 »
I am upgrading Rails from 4 to 5 version. From one of my Model say entity model I am using Skip_callbacks for one method in after_create of the model,...
(0) odpowiedzi
2017-03-18 16:03 Making a method return a specific value (that would otherwise be random) in Rspec »
I'm trying to write an rspec test that would assume a method will return a specific value when it would normally return a random number between 1 and ...
(1) odpowiedzi
2017-03-17 18:03 Rspec / Capybara clicking on button that was generated using javascript »
I have a generated a button with javascript: <script> var button = document.createElement("button"); button.innerHTML = "Do Something"; ...
(1) odpowiedzi
2017-03-17 17:03 Is there an inverse of it_behaves_like in Rspec? »
Is there something to the effect of 'it_doesnt_behave_like' or 'group_will_fail_with(SomeError)'? I don't see anything in the docs, but I feel like t...
(0) odpowiedzi
2017-03-17 15:03 How to test that a request does not return 500 error? »
I am trying to create an RSpec test which detects if a request can crash the controller, usually a 500 error. So I want to be able to distinguish betw...
(2) odpowiedzi
2017-03-16 22:03 Capybara Unable to find field »
Hello I am doing my very first tests and I would need your help. I am using Rails5. The problem is because of the nested fields I believe...(used Co...
(1) odpowiedzi
2017-03-16 18:03 Weird error when testing a Rails + AngularJS app with Rspec and PhantomJS »
I have an app that lists tickets. It uses AngularJS. Here's the controller action: def index @tickets = apply_scopes(@tickets) response.headers['...
(1) odpowiedzi
2017-03-16 15:03 Rspec - access describe name in describe context, not in `it` »
I have such simplifyed rspec code: require 'rspec' describe 'DescribeTitle' do describe_name = self.class.description p describe_name it 'shou...
(1) odpowiedzi
2017-03-15 17:03 rspec email_spec and jobs.. how does it work? I want to check whether the letter was sent.. and maybe email body »
I have 'controllers/users_controller.rb' def create user = User.new(person_params) if user.save EmailSendJob.perform_later(user.email, 'ra...
(3) odpowiedzi
2017-03-15 12:03 RSpec controller test not raising error »
I just noticed weird Rspec behaviour. I wonder if it's Rspec's error or my approach to testing is incorrect. I have this controller test (I cut out ...
(1) odpowiedzi
2017-03-15 10:03 How to execute all contexts in the defined order in RSPEC »
My _spec structure is something as mentioned below describe do context do end context do end end How I can ensure that ...
(1) odpowiedzi
2017-03-14 23:03 RSpec test not hitting view with render_view »
I am getting this error when using RSpec to test an index action and response in a Rails controller: JSON::ParserError: A JSON text must at...
(1) odpowiedzi
2017-03-14 19:03 Capybara undefined method 'current_scope' »
I have the following code scenario "it should not appears submenus' links if it doesn't has any" do expect(page.find('li.main-category', text: "Sta...
(1) odpowiedzi