Data dodania Pytanie
2017-06-02 15:06 Find sum of prime numbers less than 100 »
I'm attempting to write a method within a class that finds the sum of prime numbers. This is what I have so far: class Primes require 'rspec' ...
(1) odpowiedzi
2017-06-02 06:06 Why is Facebook Pixel suddenly raising "Can't find variable: Set" in specs »
Testing a Rails app with rspec & poltergeist, my tests have suddenly started raising Facebook Pixel Error: ReferenceError: Can't find variable: ...
(1) odpowiedzi
2017-06-01 11:06 Rspec interprets empty array as lack of parameter with Grape »
I have a Ruby (non-Rails) app that uses Grape to expose API endpoints. One of the endpoints requires a parameter that is an array of values, but accep...
(1) odpowiedzi
2017-06-01 00:06 How do you test File content_type in Rails spec? »
I have a conditional that checks for the content_type off of a ActionDispatch::Http::UploadedFile but the File class in Ruby doesn't have something li...
(0) odpowiedzi
2017-06-01 00:06 Serving files through a controller with carrierwave and restricts with Pundit gem on Post model »
I'm trying to upload a file of a photo with carrierwave and restrict(for be protected of others who don't be allowed to watch that file and after do t...
(0) odpowiedzi
2017-05-31 20:05 How to check a method call inside a Celluloid::Future block? »
Given that I have a class like this class Importer def self.process(raw_csv) csv = CSV.new(raw_csv, headers: true) while row = csv.shi...
(0) odpowiedzi
2017-05-31 18:05 Book Capitalization Class Error »
I'm teaching myself how to code and can't seem to understand how the inputted title is being called by this class. Where does the argument go to first...
(2) odpowiedzi
2017-05-31 09:05 How to assert list of values in ascending order? »
Here is a list of values in an array: [463, 246, 216, 194, 154, 152, 147, 140, 129, 128, 123, 118, 118, 102, 102, 101, 97, 96, 93, 85] How can I en...
(2) odpowiedzi
2017-05-30 20:05 Rails 5.1 Configuring Built-in System Tests with RSpec »
After watching a RailsConf video on ActionDispatch::systemTestCase, I was excited to incorporate it into my current app. Currently our test suite set...
(1) odpowiedzi
2017-05-30 20:05 Selenium with Ruby - cannot access HTML elements that I want »
I am following SauceLab's Ruby and Selenium guidebook - it's a free book to help teach Selenium in combination with Rspec. In the first real example o...
(0) odpowiedzi
2017-05-30 12:05 RSpec keeps instance variable between post requests »
In a specific test, I want to add multiples items (package_sets) in some orders from my site. To test it, I do as follow context "with multiple pa...
(2) odpowiedzi
2017-05-29 10:05 Full-stack testing: keeping mock and real responses synced »
I tried googling for several hours and could not find an answer to the following question. Is it possible to somehow sync the mock response on the cli...
(0) odpowiedzi
2017-05-29 07:05 How to integrate foreign servers/tables in rspec tests for a Rails application? »
I'm having trouble trying to test some models for foreign tables in my Rails application. I'm not sure what is the best approach to include this model...
(0) odpowiedzi
2017-05-29 02:05 Test Migrations are not running with my Rails Engine, even though `maintain_test_schema!` is specified »
I'm developing a Rails Engine (Plugin). So far I have Set up RSpec as a framework Added a migration to create a model/table called MyJob Added some...
(1) odpowiedzi
2017-05-28 17:05 ymRuby on rails: Running specs for models »
I'm new to rspec framework, and I have a rails Application that I wish to use Rspec to write unit tests for it. I followed the instructions in https:/...
(0) odpowiedzi
2017-05-28 07:05 how subject work in rspec in ruby on rails »
I recently learn about rspec test in rails and as following the link https://relishapp.com/rspec/rspec-core/v/3-6/docs/subject/explicit-subject that s...
(1) odpowiedzi
2017-05-28 00:05 Rspec/capybara - test presence of a class OR another class »
In my ruby on Rails 4.2 app, on a page I have a conditional back end rule that translates into the page front end in a change in class <div id="co...
(3) odpowiedzi
2017-05-27 17:05 Rspec reset database before each file »
I have some unit tests that only pass if I clean the database before run it. But if I run all tests with rspec command they don't work anymore, and I...
(0) odpowiedzi
2017-05-27 04:05 PDF generation CI tool test fail »
I have code that generates a PDF (using https://github.com/mileszs/wicked_pdf). I then have an RSpec test that compares the content of a PDF generated...
(0) odpowiedzi
2017-05-26 17:05 ActionMailer testing Email to Multiple Recipients »
Following the RailsGuide Action Mailer Basics, section on Sending Email To Multiple Recipients, emails are sent to the proper recipients from my app, ...
(1) odpowiedzi
2017-05-26 11:05 Refer to self in Capybara 'within' block »
I want to perform operations on a Capybara node, and on one of its children nodes: find('#some_parent_node').click find('#some_parent_node').find('.s...
(1) odpowiedzi
2017-05-26 00:05 Rspec/Capybara - change should into expect »
In my Ruby on Rails 4.2 app, I would like to change a test checking inline style to the rspec 3 more recent "expect" on a "should" but i get an error....
(2) odpowiedzi
2017-05-25 05:05 Referencing an outer node from within 'within' block »
In Capybara, I have several commands to be performed on nodes that share some identical parent node, but in a few occasions, I need to refer to a node...
(2) odpowiedzi
2017-05-25 04:05 If let(:thing) is supposed to be memoised per-example, why am I seeing the value when running a second example? »
We have this kind of pattern in a spec: describe Thing do sanity0 = '../test-data/sanity.mbox' let(:sanity1) { File.join(@scratch, 'sanity1.m...
(0) odpowiedzi
2017-05-25 00:05 Rspec 3.6, Rails 5 error: wrong number of arguments (given 2, expected 1) for `post` request »
I just started a new project in Rails 5, (my first, though I have several projects in Rails 4.x.) and am having trouble with controller specs. descr...
(1) odpowiedzi
2017-05-24 19:05 Ruby on Rails - Why validades_presence_of only work at create and not at update? »
I'm having a problem with validations at rails, i have a parameter call propose that cannot be blank, when I try to create it work, but when update do...
(4) odpowiedzi
2017-05-24 18:05 Disable sound in capybara-webkit »
I'm running a website signup spec with Capybara.javascript_driver = :webkit I noticed that when the test completes the signup, the "successful sign...
(1) odpowiedzi
2017-05-24 17:05 How to set Rails cache in rspec controller test »
I want to set Rails.cache in rspec controller test, however the cache is always blank inside the controller method. What is approach to do this? User...
(1) odpowiedzi
2017-05-23 22:05 adding session data to page in rails breaks specs »
When I add the following code into my header partial <%= session[:user_id] %> Everything works fine, but when I try to display a user's name...
(2) odpowiedzi
2017-05-23 22:05 My spec support file is not being loaded »
undefined method `login_as' for #<RSpec::ExampleGroups::InvitingUsers:0x007feea1d19f88> My methods in the spec/support/macro.rb or any other ...
(0) odpowiedzi
2017-05-23 05:05 Capybara - verifying a piece of JS is executed »
Is there a way with Capybara to verify a piece of JS is executed? I have in a Rails app a remote action and after submitting a form I'd like to make ...
(0) odpowiedzi
2017-05-22 20:05 How can I do an Rspec test on date of birth format by stubbing out Time.Now? »
This is the validation of date of birth and I need to test it out using rspec. validates :date_of_birth, date: { before: Proc.new { Date.today }, mes...
(1) odpowiedzi
2017-05-22 18:05 Rspec - why am I getting this error? »
I have created some Behavior Driven Development tests with RSpec. I am testing that a new post has successfully been created on the form I developed. ...
(0) odpowiedzi
2017-05-22 15:05 Rspec Spec - User Model validation on unique email account - spec failing »
Error message I am getting for my failing user spec is User did not properly validate that :email is case-sensitively unique. User Spec as foll...
(0) odpowiedzi
2017-05-21 05:05 sign_in user if devise not working for rspec »
Following this I came up with this code: config.include FactoryGirl::Syntax::Methods config.include Devise::Test::ControllerHelpers, type: :controll...
(0) odpowiedzi