Data dodania Pytanie
2017-09-12 17:09 Gem integration tests fail with jQuery not found »
I have a gem called "fantastic" with a dummy app inside to test. When running the dummy app, everything works well. However, when I run the tests, un...
(1) odpowiedzi
2017-09-12 02:09 Testing a signup confirmation with Rspec/Factory Girl/Rails »
Trying to create an Rspec/Factory girl test to make sure that Devise's confirmation on signup is covered - the site has 3 languages (Japanese, English...
(1) odpowiedzi
2017-09-11 19:09 Properly configure IntelliJ to use Ruby in a Java Project »
How to I configure IntelliJ Idea so I can use Ruby in a primarily Java project? (Specifically, I am using RSpec to drive my system tests.) As far as...
(0) odpowiedzi
2017-09-11 17:09 Unable to override RSpec Sysntax module method »
I wanted to override the expect in under Syntax module. So, i have placed the below code into the .config/initializers/syntax.rb file module RSpec ...
(1) odpowiedzi
2017-09-11 14:09 ruby execute_script for custom function leads to no results »
I have custom JS function about some of page performance details Doing automation via ruby-rspec-capybara Having next code: visit page execu...
(1) odpowiedzi
2017-09-09 08:09 Failure/Error: expect(page).to have_content(/description/) »
I'm encountering this error, which i think is because i have a navigation bar placed right on top of my page, hence rspec is detecting for text within...
(2) odpowiedzi
2017-09-08 19:09 FactoryGirl - NoMethodError when calling def_delegators »
I'm using FactoryGirl and Rspec for testing on rails, and I have come across a problem when I use methods that are define using def_delegators. For e...
(1) odpowiedzi
2017-09-08 15:09 use rspec built in matcher within custom matcher »
I have a test suite with too many assertions like this expect(array_1).to match_array array_2 expect(array_3).to match_array array_4 expect(array_5)....
(1) odpowiedzi
2017-09-08 10:09 How I wait for the a number of objects to be displayed? »
I'm trying to avoid using the sleep function to wait for a page to load with a certain number of the same element. I have 2 elements on a page, I dele...
(1) odpowiedzi
2017-09-07 23:09 No implicit conversion of nil into String when stubbing 'gets' method »
I'm having problems with testing this simple command line game. My test: it 'should ask the user name' do allow(@game).to receive(:get_name) { 'Pa...
(1) odpowiedzi
2017-09-07 19:09 What does specifying the type in an RSpec actually affect? »
I have never been sure what the difference between these options are RSpec.describe V2::DirectMessagesController, type: :controller vs RSpec.descr...
(1) odpowiedzi
2017-09-07 18:09 RSpec request logging »
I'm using Rails 5.1 with RSpec 3.6. While running request specs of my API endpoints I can see the requested endpoints in output, for example: [2017-0...
(0) odpowiedzi
2017-09-06 22:09 Cannot find kendo-ui drop down using capybara »
I know kendo-ui hides elements from view. unselectable="on" However, I am unable to find a specific drop down or it's options using capybara. Please ...
(1) odpowiedzi
2017-09-06 19:09 Chef warning about platform and version running Coverage for ChefSpec »
I am relatively new to Chef and very new to ChefSpec. I'm trying to run Coverage to get ChefSpec coverage using the spec_helper.rb file below: requir...
(1) odpowiedzi
2017-09-06 18:09 Passing Index Loop Vars To Objects in Ruby with TDD »
I'm trying to get a very simple set of tests done in TDD and Ruby. The problem I'm having is in trying to pass a range of values from the test to the...
(0) odpowiedzi
2017-09-05 11:09 Why are 'end' & 'else' statement not counted in code coverage during rspec testing? »
I am using simplecov gem to view test coverage. In following image, I can see two statements else and end are in white colour. Are these lines not cou...
(1) odpowiedzi
2017-09-05 09:09 Rails: accessing controller instance variables in rpec test »
In an Rspec controller test I want to check the values of instance variables in my the controller that I am testing. For example, controller: clas...
(1) odpowiedzi
2017-09-05 04:09 Passing variable between multiple contexts with Rspec »
I'm writing some tests using FactoryGirl and Rspec. spec/factories/students.rb: FactoryGirl.define do factory :student do end factory :studen...
(1) odpowiedzi
2017-09-04 17:09 Capybara::ElementNotFound issue with remote true »
I have a form which I am submitting using remote=>true <%= form_tag fetch_data_path, :remote => true do %> Date: <%= text_field_tag ...
(1) odpowiedzi
2017-09-04 13:09 Undefined method 'click' - Webdriver »
I'm learning test automation. I'm using the 'cucumber', 'rspec', 'selenium-web driver' framework in Ruby language. In the tests, I was able to perform...
(1) odpowiedzi
2017-09-04 09:09 RSpec path helper unavaliable in services/form_objects specs »
I am using rspec-rails 3.5.2 and Rails 5.0.1 (well, upgrading to it... RSpec used to be 3.4.2 and Rails 4.2.7.1). In my services/form_objects specs I ...
(1) odpowiedzi
2017-09-03 19:09 Exception Exception RSpec »
I have a method depart(plane) which takes an error fail "The plane can't set off because it is stormy" if @weather.stormy?. This is defined in my ai...
(1) odpowiedzi
2017-09-03 13:09 Ruby on Rails v5.1.3 does not pass the create test »
I have the following problem Failures: 1) QuestionsController POST #create with valid attributes saves the question in the database Failure/Error:...
(1) odpowiedzi
2017-09-03 03:09 syntax error ruby rspec testing »
Hi for the life of me I cannot locate a syntax error in my rspec file. I've gone over it dozens of times and just can't find it. I could use an extr...
(1) odpowiedzi
2017-09-02 15:09 Reform validation doesnt work in Rspec tests »
I have written myself a model that looks something like this: class PersonalDetailsForm < Reform::Form include Reform::Form::ActiveModel::ModelR...
(0) odpowiedzi
2017-09-01 14:09 Test a controller with distinct body and querystring params »
I'd like to test with RSpec a controller receiving this kind of request: curl -X POST \ --data "{\"same_key\": ...
(1) odpowiedzi
2017-09-01 09:09 Rails - Rspec: test PUT update to actually change Model attributes »
I have the following: let(:update_request) { put "/api/v3/account/profile.json", attributes, credentials } describe "PUT 'update'" do before { upd...
(1) odpowiedzi
2017-09-01 01:09 RSpec 3 best practices and expect_any_instance_of in Rails »
The RSpec documentation is clearly opposed to expect_any_instance_of, saying it should only be used on legacy code, so I'm looking for best practice a...
(1) odpowiedzi
2017-08-31 12:08 Check if checkbox is unchecked »
I am trying to write a test that checks if a checkbox is checked or not, if not checked what method will I use to have it checked. I already have wri...
(5) odpowiedzi
2017-08-31 12:08 creating a temporary entry to a model for rspec testing »
i have a flash message in controller and i want to test it using rspec. In my controller i am setting a flash[:notice] if the database is empty other...
(2) odpowiedzi
2017-08-31 10:08 RSpec Spy method issue »
it "calls #create if #find_or_create is called and no matching record exists" do snack = class_spy(Snack, find_by_name: nil) attrs = {name: 'test'...
(1) odpowiedzi
2017-08-30 23:08 Using Zeus for Rails auto-reloading, how do I include classes in extra subfolders? »
I'm working on a large Rails 3.2 project. I use Zeus (and sometimes Guard) to auto reload rails so the tests run faster. However, when running certain...
(0) odpowiedzi
2017-08-30 18:08 Factory girl association self referencing the parent model »
In my application an account can have a single owner (user) and multiple users. In my tests I do this: # account_factory_static.rb FactoryGirl.defi...
(1) odpowiedzi
2017-08-30 16:08 string vs symbols rails »
I got stuck with an error for days in my rspec tests. Then i found that the problem was the use of symbol instead of string user_response = JSON.pars...
(3) odpowiedzi
2017-08-30 15:08 Rspec shoulda matcher test on activerecord model fails due to validation of associated model »
My model has a validation concerning one of it's associated models. My rspec tests of the model are failing due to this validation. describe NewOffer...
(1) odpowiedzi