Data dodania Pytanie
2017-09-17 17:09 FactoryGirl ArgumentError: wrong number of arguments (given 1, expected 0) »
I'm running tests for a rails' controller and I'm finding some weird behavior. While in one of the rspec test file for another controller both methods...
(1) odpowiedzi
2017-09-17 15:09 rspec double arbitrary number of and_yields »
Mocking an each with a varying number of iterables. code: class Test def run(file) File.open(file).each do | line | puts line end ...
(0) odpowiedzi
2017-09-17 10:09 Rspec test if edit icon is visible on index page »
I have tried doing the following but test is not able to detect that the edit icon linking to the edit page is visible to the article owner on the ind...
(1) odpowiedzi
2017-09-16 19:09 Rspec follow friends test »
I am testing a feature where a user can follow another user. Friend request will be pending until other user accepts the friend request. I can't fig...
(0) odpowiedzi
2017-09-16 02:09 Rspec stub file valid? »
New to RoR / Rspec, created this method: def create @file = File.new(file_params) if @file.valid? #Model checks for :content_type => ['image...
(1) odpowiedzi
2017-09-15 20:09 Running Nested Tags in Rspec »
I'm trying to architect my tests in such a way so I can run certain context blocks by themselves, but also need to further enforce nested tags in indi...
(1) odpowiedzi
2017-09-15 16:09 RSpec equality matcher failing for serializer test »
I am writing a test for one of my Active Model Serializers to make sure that the JSON output is what I expect. However, I cannot figure out why RSpec ...
(3) odpowiedzi
2017-09-14 15:09 FactoryGirl.attributes_for with conversion time/unixtime »
I work on Rails 5.1.2 and FactoryGirl 4.8.0 and PostgreSQL 9.1.2. I have a activities table like bellow. id | integer title ...
(0) odpowiedzi
2017-09-14 12:09 Use puppet gem to parse node files and generate specs for each host »
I'm integrating rspec-puppet tests in our puppet project and I'm trying to auto generate "should compile" specs for all hosts (and eventually probably...
(0) odpowiedzi
2017-09-13 22:09 check prawn pdf content after rendering with rspec »
I'm trying to test the content of a pdf generated by prawn, i would like to be sure that the information entered comes from the order. I get this one ...
(0) odpowiedzi
2017-09-13 16:09 Set variable once for all examples in RSpec suite (without using a global variable) »
What is the conventional way to set a variable once to be used by all examples in an RSpec suite? I currently set a global variable in spec_helper th...
(1) odpowiedzi
2017-09-13 15:09 Rspec create action: expected #count to have changed by 1, but was changed by 0 »
I'm doing some controller testings on my app, and when I test the create action for creating a new service, it gives me this error: "expected #count ...
(0) odpowiedzi
2017-09-12 22:09 Testing ruby program with rspec »
At this moment i am learning ruby ,and i want to learn how to develop apps using rspec and BDD, but i never done any kind of testing before. Its hard ...
(2) odpowiedzi
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