Data dodania Pytanie
2017-10-10 23:10 Rspec post :create 'unknown keyword: ' »
I'm new to Rspec and I am trying to test my controller methods for basic functionality. I know I'm not supposed to test basic functionality, but I'm d...
(1) odpowiedzi
2017-10-09 19:10 Rspec tests failing if run all together »
I've 2 _spec files: the first containing unit test, the other one some integration tests. While running them by specifying file name they are alle gr...
(1) odpowiedzi
2017-10-09 14:10 Testing a method that delegates to another object »
This is a model in my project - class Subscription < ActiveRecord::Base def active? SubscriptionValidationPolicy.new(self).active? end en...
(1) odpowiedzi
2017-10-06 12:10 Laravel 5.5 Unit testing controller method »
I am trying to setup a simple unit test for one my controller method. The goals is to test if the a view has an expected value. /** * Does the home...
(1) odpowiedzi
2017-10-06 11:10 Jest play with Redux actions »
I'm trying to implement snapshots with jest and i ran into a problem. The solution is probably simple, but i can't find it. LoginForm.js class Login...
(3) odpowiedzi
2017-10-04 23:10 Rspec - archives array to match tested array »
I'm having this class method on my Post model for getting archives def self.archives Post.unscoped.select("YEAR(created_at) AS year, MONTHNAME(cr...
(2) odpowiedzi
2017-10-04 14:10 Error: Enzyme Internal Error: unknown composite type undefined »
I'm getting this error when try to apply enzyme and I couldn't find any relative issue about this. Here's the test.js; import React from 'react'; im...
(1) odpowiedzi
2017-09-27 15:09 Why do I get a circular reference DummyApiController --> DummyApiController when using a specimen builder? »
I'm trying to generate some subclasses of ApiController (WebAPI 2) using AutoFixture (3.50.6). I customized AF to allow generating ApiControllers usi...
(0) odpowiedzi
2017-09-27 14:09 Scala: Mock init fails with Cats IO type parameter »
While writing tests I'm confronted with the following exception: java.lang.ClassCastException: codegen.java.lang.Object$MockitoMock$641592186 cannot ...
(1) odpowiedzi
2017-09-26 10:09 How to stub/mock without coupling the test to the code under test with rspec? »
Say there's a worker, whose job is to: find or create a record by a set of critaria; update an attribute of the record. Here's a sample implement...
(1) odpowiedzi
2017-09-24 16:09 Calling Assert.Inconclusive() in an async unit test is reported as a fail »
I have a series of unit tests that connect to an Azure Storage emulator. In Setup my code checks if there is something listening on the emulator's po...
(2) odpowiedzi
2017-09-19 15:09 Mocking a post request with binary data in Sinatra »
I have an endpoint in my Sinatra application that will be receiving binary data as part of the body. The other application sending it data will have a...
(1) odpowiedzi
2017-09-18 12:09 Mock Async method on Service using Moq »
I am working in a .Net Core API. I wish to unit test the GetArtists method on the ArtistsController. CODE Here is my controller code: [Route("artis...
(1) odpowiedzi
2017-09-16 09:09 Unit test glide to make sure a image view has the correct image path »
Android Studio 3.0 Beta 5 robolectric:3.3.1 I have a the following view holder that loads a image url using the glide library. I am trying to find a...
(2) odpowiedzi
2017-09-11 23:09 Correct unit testing »
I started using unit and functionality test with this project and because of this I have some questions: Im working with the symfony php framework. A...
(3) odpowiedzi
2017-09-11 22:09 How do I test Django views when they don't return values »
I'm new to Django. I've worked through some tutorials, written some models, views, forms etc. but I don't understand how they can be tested since eit...
(3) odpowiedzi
2017-09-08 12:09 How do I get the Sinatra app instance that's being tested by rack-test? »
I want to get hold of the app instance being tested by rack-test so that I can mock some of its methods. I thought I could simply save the app instanc...
(2) 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-30 13:08 Inspect DefaultHttpContext body in unit test situation »
I'm trying to use the DefaultHttpContext object to unit test my exception handling middleware. My test method looks like this: [Fact] public async T...
(1) odpowiedzi
2017-08-29 10:08 Mocking input using python wrapped c++ SWIG »
I'm new to swig and python unittesting. Here's what I'm trying to do. I have a c++ function that requires user input. The C++ code is wrapped into ...
(1) odpowiedzi
2017-08-28 17:08 Robolectric: Resources$NotFoundException: String resource ID with Android Gradle Plugin 3 »
Android Studio 3.0 Beta2 classpath 'com.android.tools.build:gradle:3.0.0-beta3' testCompile 'org.robolectric:robolectric:3.4.2' Test class that I am...
(3) odpowiedzi
2017-08-21 16:08 How to test a method with XCTestCase in Objective C which does not return a value »
I am practicing for Unit test cases in XCode. I have a method in my controller class which has some lines of code but this method does not return any ...
(0) odpowiedzi
2017-08-21 09:08 Correct way to start RSpec-puppet unit tests »
I have created a simple Puppet 4 class and a unit test to go along with it as follows (after executing touch metadata.json; rspec-puppet-init while in...
(1) odpowiedzi
2017-08-18 14:08 ASP.NET MVC Unit Test for testing CSRF attacks? »
How can I write an integration/unit test to pass the CSRF attacks in order to write a passing test for my CRUD operations? How should I send a CSRF ...
(0) odpowiedzi
2017-08-18 11:08 Testing viewmodel constructor arguments with Moq »
I have a basic CRUD application written in ASP.NET Core, with an example controller action looking like so: public IActionResult Sheet(Guid character...
(1) odpowiedzi
2017-08-18 09:08 Running unit tests for Puppet modules »
I would like to add RSpec unit tests to some Puppet 4 modules. To get started and confirm basic functioning, I would first like to run unit tests that...
(1) odpowiedzi
2017-08-18 08:08 One failing test causes other async tests to fail »
I have a very basic karma/jasmine setup with one test suite containing two tests. I expect the first test to fail and the second test to pass. descri...
(1) odpowiedzi
2017-08-17 15:08 Rspec test with mock for a static method and non static method »
I have a method like this: def self.method #API CALL end And I was writing a test for the controller method that calls this static method. It is ...
(2) odpowiedzi
2017-08-16 21:08 How to resolve the dependencies of a WebAPI Controller with DryIoc »
I've been reading through the documentation and I'm a little confused as to how I would achieve this. I have a WebAPI Controller called NewsController...
(1) odpowiedzi
2017-08-13 11:08 Testing BLL using Mock, Repository and UnitOfWork C# UnitTesting »
I implement Repository and Unit Of Work in my project, I am using the same architecture here. So, I have 3 layers in my project (DAL, BLL and UI), and...
(1) odpowiedzi
2017-08-12 22:08 Unit tests for modules using Play cache (Scala) »
Looking for some guidance for unit testing a module using Play cache in Scala. I have a method which queries database, gets static data and stores in ...
(0) odpowiedzi
2017-08-12 16:08 How to reduce the number of database connections in tests in PHPUnit and ZF3? »
I'm writing integration/database tests for a Zend Framework 3 application by using zendframework/zend-test 3.1.0, phpunit/phpunit 6.2.2, and phpunit...
(0) odpowiedzi
2017-08-11 15:08 Dependency injection and mocking in functional javascript and RxJS »
I am trying to rewrite a library written in classical OO Javascript into a more functional and reactive approach using RxJS and function composition. ...
(2) odpowiedzi
2017-08-08 17:08 How to force dicts to be unordered (for testing)? »
I've just spent half a day tracing down a bug to a dict that I forgot to sort when iterating over it. Even though that part of code is tested, the tes...
(1) odpowiedzi
2017-08-06 18:08 Having difficulty mocking Promise.all »
I would like to mock out this function: function getMetaData(key) { var deferred = $q.defer(); var s3 = vm.initiateBucket(); ...
(1) odpowiedzi