Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

refactor duplicate tests rspec

describe '#double_it' do
  def self.test_double_it(initial, doubled)
    it "doubles #{initial} into #{doubled}" do
      expect(double_it(initial)).to eq(doubled)
    end
  end

  test_double_it 1, 2
  test_double_it 2, 4
  test_double_it 4, 8
end
Comment

PREVIOUS NEXT
Code Example
Ruby :: rails check log level of application 
Ruby :: reduce ruby baud rate 
Ruby :: rails db:drop not working 
Ruby :: rails migration error 
Ruby :: rails-react syntax error jsx not enabled 
Ruby :: how to comment out embedded ruby 
Ruby :: sequel not ruby 
Ruby :: Missing template clients/show with {:locale=[:en], :formats=[:pdf], 
Ruby :: height of a tree in ruby 
Ruby :: rails list down attributes of model 
Ruby :: ruby array join 
R :: linetype ggplot in r 
R :: remove null element from list r 
R :: find data types in list r 
R :: how to match two time series in r 
R :: variable assignment in r 
R :: how to find the R packages and versions 
R :: expression in r 
R :: r remove row dataframe 
R :: operators R 
R :: convert index to column r 
R :: r sapply syntax 
R :: %in% r 
R :: how to source all fies from a directory in r 
R :: r ggplot hide one legend group from multiple legends 
R :: how to enter character string with quotes in r 
R :: Now to find the r2 score 
R :: R new column t test p-value 
R :: how to add in R dictionary 
Rust :: how to index a string in rust 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =