Coder Social home page Coder Social logo

dataset's People

Contributors

aiwilliams avatar bclennox avatar jgarber avatar ntalbott avatar petyosi avatar saturnflyer avatar siannopollo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dataset's Issues

Specify which tables should be emptied

Using dataset erased all data from all tables in the test db. In my case, working with a legacy database that only needs to be read from, this is a Bad Thing. This monkey patch at the bottom of spec_helper.rb helps:


module Dataset
  module Database # :nodoc:
    
    # Provides Dataset a way to clear, dump and load databases.
    class Base
      include FileUtils
      
      def clear
        connection = ActiveRecord::Base.connection
        ActiveRecord::Base.silence do
          connection.tables.each do |table_name|
            unless %w{table_to_keep another_table even_another_table}.include? (table_name)
              puts "Emptying #{table_name}"
              connection.delete "DELETE FROM #{connection.quote_table_name(table_name)}",
                "Dataset::Database#clear" unless table_name == ActiveRecord::Migrator.schema_migrations_table_name
            else
              puts "Skipping #{table_name}"
            end
          end
        end
      end
    end
  end
end

It would be great to have a setting in dataset that lets me specify either which tables NOT to empty and/or which tables TO empty.

test speed? Has it improved with dataset?

in the the README I find the following text:

The goal is to see a marked improvement in overall test run speed, basing this on the assumption that it is faster to have the OS
copy a file or mySQL dump and load. Of course, we may find this to be a false assumption, but there were plenty of bugs in the    
former 'Scenarios' - addressing that afforded the opportunity to test the assumption.

Did you find answer to that assumption? I believe that the dataset approach can increase my test suite's speed greatly, but I would love to hear your experience?

Thanks a lot,

Jeroen

NB. I still have to integrate dataset into my application's test suite therefore it would be nice to get an answer on the above before i go into all the effort.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.