Data dodania Pytanie
2017-11-11 21:11 I've unintentionally created a production database. Will this destroy the production data that already exists? »
Context: I've built a rails app that's in production. Originally, the scope of the project was small so I didn't need to write tests, but as it grows,...
(1) odpowiedzi
2017-11-10 18:11 Doing rspec testing with subdomains »
So I have an app that is heavily dependant on subdomains that are generated with each user. And what I need is to pass the proper subdomain for each t...
(1) odpowiedzi
2017-11-10 15:11 What does Timeout.timeout(0) mean in chef server spec (Ruby) »
I am trying to write server spec code for some service. I want to add the timeout so that if within given time, command doesn't responds, the test cas...
(2) odpowiedzi
2017-11-10 12:11 Can I prevent rspec of running other examples in group if specific one didnt pass? »
I asked it in rspec-core repository (https://github.com/rspec/rspec-core/issues/2477) but after that I thought that it is not the proper place to ask ...
(1) odpowiedzi
2017-11-09 18:11 Rspec with string list argument matcher »
I'm writing an Rspec unit test that's trying to assert that a string passed to a function includes a list of substrings. Specifically, it is of the fo...
(0) odpowiedzi
2017-11-09 13:11 cucumber scenarios and rspec test »
I'm almost finished building my first rails application and now I have to cover it with cucumber scenarios and rspec tests. My knowledge about testing...
(0) odpowiedzi
2017-11-09 09:11 How to write RSpec to check if associated record exists? »
I am newbie to RSpec. I am having a model teacher that has_many :lessons. Here is my FactoryGirls records: spec/factories/lessons.rb FactoryGirl.def...
(1) odpowiedzi
2017-11-08 12:11 Passing an example from "it" block to "let" block in RSpec »
I was watching a codeschool screencast on using RSpec and it had the following lines: describe Game do describe '#call' do let(:description) do...
(1) odpowiedzi
2017-11-08 11:11 publish junit test result report from parent's workspace »
I have a parent job and two child jobs in jenkins. The workspace shared by the child jobs resides within the parent job. Now the child jobs are produc...
(1) odpowiedzi
2017-11-08 08:11 How to test production build of Rails project with same Rpec tests? »
I'm building an JSON API service with Rails and using docker for running it in production. In my Dockerfile I would want to use: RUN bundle install -...
(1) odpowiedzi
2017-11-07 20:11 Why does my rspec matcher not meet my equality error conditions? »
I am getting the following error in my spec, but my errors are identical: expected: (#<MessageStrategySMS::CountryNotSupportedError: The country '...
(0) odpowiedzi
2017-11-07 18:11 Rspec Testing : NoMethodError - undefined method 'id' for nil.Nilclass »
When I am running rspec testing for a controller in Rails, I get the error "NoMethodError : undefined method 'id' for nil.Nilclass" at the second line...
(1) odpowiedzi
2017-11-07 11:11 rails rspec stubbed ActiveRecord::Relation for ActiveRecord Serialize »
can I stub ActiveRecord::Relation for ActiveRecord Serialize !? I could stub ActiveRecord::Relation .. but it doesn't work for ActiveRecord Serialize...
(0) odpowiedzi
2017-11-06 20:11 Rspec: Comment rendered as created by a user different from logged in user »
I'm new to rspec and capybara and learning by slowly expanding my test scenarios. I am unable to understand why a comment which i created after logg...
(1) odpowiedzi
2017-11-06 17:11 Rspec shared context and factory parameters »
I have a lot of specs that need to have authentication contexts. I want to DRY specs and I've created a shared context. And I need to passa some param...
(0) odpowiedzi
2017-11-06 16:11 How to check if rake task was finished? »
This is my first experience with RoR and I using the rspec tool to test my controller. But inside the methods, I using rake tasks to create asynchrono...
(1) odpowiedzi
2017-11-05 23:11 Rspec to upload file with params »
I'm trying to write spec for testing upload function and the code implementation works as expected however when I tried to write spec I'm not able to ...
(1) odpowiedzi
2017-11-05 18:11 Rails + Rspec: Instance variable created in 'before' block cannot be used in 'it' test »
I can't figure out what is the issue preventing a comment variable instantiated in rspec "before do" block from being utilized in "it" test. I have t...
(0) odpowiedzi
2017-11-05 10:11 Ruby on Rails + Rspec: Syntax for css selector containing instance variable »
I have an rspec test where i need to specifically find a div block, from articles index page, corresponding to an article id and find the glyphicon re...
(1) odpowiedzi
2017-11-04 02:11 Rails Pundit RSpec »
I am using Pundit with Devise and think I am missing something pretty basic on RSpec. I have a simple policy that lets a user who owns the model, vie...
(0) odpowiedzi
2017-11-04 01:11 How do I validate a model based on the attributes of an association? »
In Rails4, I have a model that belongs to another model. How do I validate based on the value of an attribute in the parent model? In a food menu sy...
(1) odpowiedzi
2017-11-03 23:11 Rails Controller Spec. Wrong number of arguments »
I'm trying to test my controller using RSpec but I'm getting the error below. error 1) Api::V1::UsersController GET #show responds with 200 status...
(0) odpowiedzi
2017-11-03 18:11 Can't modify frozen Array error when running rspec »
Had been in the process of getting a Rails Engine upgraded to Rails 5.1 and now in the process of getting the rspec tests back working. I have a cont...
(0) odpowiedzi
2017-11-03 18:11 Shoulda-matchers not working for PORO »
So I have the following spec: require 'rails_helper' class SpecRecord # include ActiveModel::Model include ActiveModel::Validations attr_acces...
(1) odpowiedzi
2017-11-02 18:11 TypeError: can't define singleton (RSpec) »
This might look like a newbie issue but I'm stumped. I'm trying to build a simple Ruby slack service and I'm putting together some unit tests using RS...
(1) odpowiedzi
2017-11-02 06:11 Rspec - PG::UndefinedTable: ERROR: relation "application" does not exist »
I'm trying to start building out and running my rspec tests using bin rails\test. They used to work a while ago, but now when I run them i'm getting t...
(1) odpowiedzi
2017-11-01 23:11 Testing AJAX with Rspec: this code works but the spec can't find the route »
I have this Javascript in a page: <script type='text/javascript'> function update_price(order_id, quantity) { $.ajax({ beforeSend: ...
(1) odpowiedzi
2017-11-01 15:11 Rspec + Capybara webkit: Not directed to path stated in test, instead root path syntax detected »
I am running a rspec test of visiting a path and creating a new conversation on that page. However, i can't understand why i am getting the error belo...
(1) odpowiedzi
2017-10-31 23:10 chefspec: test linux kernel version number »
How do I write a test on Linux system meets minimum kernel version of 2.6.20 or greater inside the following file? spec/unit.recipes/default_spec....
(2) odpowiedzi
2017-10-31 13:10 How to use send method to post, get, update route? »
I'm trying to DRY some request specs. I need to pass to a shared example the following params: method, action, params shared_example: shared_conte...
(1) odpowiedzi
2017-10-31 04:10 Rspec controller test for a custom POST method is so confusing »
I couldn't write a post test method for add_queue_item namespace :api do namespace :v1, defaults: {format: 'json'} do resourc...
(1) odpowiedzi
2017-10-30 20:10 "Undefined method `cookies' for {}:Hash" in controller test after rails 5 upgrade »
I have simple rspec controller test: require 'spec_helper' describe RenderedTemplatesController, type: :controller do let(:template) { create(:tem...
(1) odpowiedzi
2017-10-30 15:10 Rspec gets strip test will not run »
I am trying to spec the current method: class CLIinterface def units_inputs puts "\n\n_______________________________________________________...
(2) odpowiedzi
2017-10-30 14:10 Passing attributes in test url - Rspec / Addressable gem »
From a View file I pass attributes in a url: %= link_to piece_path(@current_piece, file: file, rank: rank), method: :patch do %> this gives urls ...
(3) odpowiedzi
2017-10-29 14:10 Controller does not find id to redirect to »
I have this controller: class SalesmenController < ApplicationController before_action :find_salesman, only: [:show] def show authorize!...
(1) odpowiedzi