Skip to content

Commit

Permalink
fix(volatile): return t, not result of memq
Browse files Browse the repository at this point in the history
  • Loading branch information
Walheimat committed Jan 13, 2024
1 parent a3bbbaa commit a0e8033
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.3]

### Fixed

- `bydi-mock--volatile` no longer returns the resut of `memq` which
can mess up tests. Instead it returns `t` or `nil`.g

## [0.6.2]

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cask
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(depends-on "undercover")
(depends-on "compat"))

(package "bydi" "0.6.2" "Mocking facilities")
(package "bydi" "0.6.3" "Mocking facilities")

(package-file "bydi.el")

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME=bydi

CURRENT_PACKAGE_VERSION=0.6.2
CURRENT_PACKAGE_VERSION=0.6.3

include dinghy/emacs-package.mk
4 changes: 2 additions & 2 deletions bydi.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

;; Author: Krister Schuchardt <[email protected]>
;; Homepage: https://github.com/Walheimat/bydi
;; Version: 0.6.2
;; Version: 0.6.3
;; Package-Requires: ((emacs "29.1"))
;; Keywords: extensions

Expand Down Expand Up @@ -449,7 +449,7 @@ Optionally, return RETURN."

(defun bydi-mock--volatile (fun)
"Check if FUN should return t."
(memq fun bydi-mock--always))
(and (memq fun bydi-mock--always) t))

(defun bydi-mock--check (fun instruction)
"Verify binding FUN using INSTRUCTION."
Expand Down

0 comments on commit a0e8033

Please sign in to comment.